ircII: /away replacement script

0 views
Skip to first unread message

Carl von Loesch

unread,
Jul 20, 1993, 2:22:59 PM7/20/93
to
Whenever I typed /away, I had this dreadful feeling that my stupid
message that probably nobody wants to read most probably is going
to travel around major parts of the globe just to keep all IRC
servers informed.

So here I wrote up an /away replacement for ircII

It sends an automatic "describe" (a CTCP ACTION) to everyone
who has not yet received the message. That means, the message only
goes out once to each person who sends you a /msg.
All other types of message are ignored, /auto only acts on /msg.

This script provides the following command:

/auto_me <description> Setup an automatic msg reply.

It is useful to have this type of aliases in the .ircrc to use with /auto:

alias working auto_me is working. Beep to obtain attention.
alias busy auto_me is busy. Replies may be delayed.
alias away auto_me is away

'auto' works with ircII version 2.2.1.2. Dunno about other ones.

Here comes the script 'auto' soon to be available in standard
ircII distributions (Daemon: hint! hint!).

--- start of 'auto' ---

# Experimental away replacement, lynx93
alias auto_me {
if (auto.msg) {
echo [auto] No longer: \"$N $auto.msg\"
^set -status_user
^set -status_user2
purge auto
}
if ([$0]) {
^assign auto.msg $0-
^on -msg * if (auto.p[$0]) {
# msg stats for fun:
@ auto.p[$0] = 1 + auto.p[$0]
^set status_user - last: $0
} {
describe $0 $auto.msg
assign auto.p[$0] 1
# verbose: echo [auto] $0 informed
^set status_user - $0 informed
}
echo [auto] \"$N $auto.msg\"
^set status_user2 [auto]
}
}

# List numbers of received messages while being auto'd
alias msgstats foreach auto.p ii {
echo [auto]$[-10]{ii}: $[-5]auto.p[$ii] messages
}

# Taken from 'netsplit'
alias purge {
foreach $0 ii {
purge $0.$ii
}
^assign -$0
^assign -ii
}

--- end of 'auto' ---

Enjoy :)


--
o+--_________________________--------/ --------------------------------- \--+o
o|~( )~!+-!~( loe...@informatik.uni-oldenburg.de )~|o
o|~( Carl 'LynX' v. Loesch )~!+-!~( 244661 at DOLUNI1 .bitnet )~|o
o+-(_________________________)-------\ --------------------------------- /--+o
"Booting is not a repair technique"

matthew green

unread,
Jul 21, 1993, 6:55:34 AM7/21/93
to
this script breaks irc protocol. it should send a notice not a
privmsg.

phone..

Reply all
Reply to author
Forward
0 new messages