alias telnet {
window -aCdek[0] @telnet
echo @telnet 14T15elnet Opened – $time – %ver2 | adline
titlebar @telnet Telnet – $time
}
on 1:input:@telnet:{
if (/ isin $1) { $1- }
else { sockwrite -tn telnet $1- }
}
on 1:sockopen:telnet:{
if ($sockerr > 0) { echo @telnet 14Cant connect to %tserver $+ : $+ %tport | sockclose telnet | adline }
else { echo @telnet 14Connected to $sock($sockname).ip $+ : $+ $sock($sockname).port – Session Opened… | adline }
}
on 1:sockread:telnet:{
sockread %telnet
aline @telnet %telnet
}
menu @telnet {
Connect a server:set %tserver $?=”server” | set %tport $?=”port?” | sockclose telnet | sockopen telnet %tserver %tport | echo @telnet 14Connecting to %tserver $+ : $+ %tport | adline
–
Connect to last server ( $+ %tserver %tport $+ ):sockclose telnet | sockopen telnet %tserver %tport | echo @telnet 14Connecting to %tserver $+ : $+ %tport | adline
–
Disconnect:echo @telnet 9Connection closed from %tserver | sockclose telnet | adline
}
on 1:sockclose:telnet:{
echo @telnet 9Connection closed from $sock($sockname).ip | adline
}
menu status,menubar,nicklist,channel,query {
–
Open Telnet:telnet
}
on 1:close:@:{
if ($target == @telnet) {
sockclose telnet
}
else {
halt
}
}
alias adline {
aline @telnet 9-
}