1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
# EPIC's mud client, 1998
# Based on the old 1994-vintage script by the same name
# This script requires EPIC4pre1.050 or better
# Here's the plan:
#
# Usage: newmud keyword hostname portnum
# registers "keyword" in the mud array
#
# Usage: mud
# shows you the muds in the array
#
# Usage: mud keyword
# logs you into that mud
#
alias mud {
if ([$0])
{
if (mud[$encode($0)][name])
{
if (mud[$encode($0)][mark])
{
echo *** Already connected to that mud!
}
{c_mud $0 $mud[$encode($0)][name] $mud[$encode($0)][port]}
}
{echo *** No such mud on file}
}
{
foreach mud i
{
echo *** MUD: $decode($i) - $mud[$i][name] $mud[$i][port]
}
}
}
alias c_mud {
@ keyw = [$0]
@ mudcon = mudcon + 1
if (mudcon > 4) {
@ mudcon = mudcon - 1
echo *** Too many muds open (limit of 4)
} elsif (fd = mud[$encode($0)][fd] = connect($1 $2)) {
window new name $keyw level NONE
^on ^dcc_raw "$fd % d *" \{xecho -w $keyw $$chop($3-)\}
^on ^dcc_raw "$fd % c" {
on dcc_raw -"$0 % c"
on dcc_raw -"$0 % d *"
@ mudcon = mudcon - 1
}
window query =$fd
}
}
bind ^W next_window
alias newmud {
@ mud[$encode($0)][name] = [$1]
@ mud[$encode($0)][port] = [$2]
}
newmud onyx stimpy.cs.iastate.edu 3456
newmud moo lambda.moo.mud.org 8888
@ mudcon = 0
#hop'98
|