Rainer Kalthoff wrote:
> is there a command like /achan (message to all channels) that puts a message to
> all channels on all instances of AmIRC?
> Reason is, I have several servers with many channels where I am connected at
> the same time. So typing the same greeting message to 5 AmIRC is anoying when
> you have to do this every day.
> 
> Maybe someone already has a script to do this, I would be pleased to get a hint
> how to do this.

my All.amirx script -
-----
/*
  * $VER: All.amirx 2.1 (02.12.2002) �2002 Robin Cloutman <[EMAIL PROTECTED]>
  *
  * AmIRC script to write a line to *every* open amirc channel
  */

OPTIONS RESULTS
PARSE ARG args

IF LEFT(args,1)=='"' THEN args = STRIP(args,'B','"')
ports = SHOW('P')
DO WHILE ports~=''
        i = POS('AMIRC.',ports)
        IF i==0 THEN LEAVE
        PARSE VAR ports =i port ports
        ADDRESS VALUE port
        'GETMYNICK'
        nick = RESULT
        'USERHOST 'nick
        userhost = RESULT
        string = args
        DO WHILE string~=''
                PARSE VAR string line '\n' string
                IF UPPER(LEFT(line,4))=='/ME ' THEN DO
                        me = 1
                        PARSE VAR line . =4 line
                        line = d2c(1) || 'ACTION' || line || d2c(1)
                END
                ELSE me = 0
                IF LEFT(line,1)~='/' THEN DO
                        'Channels'
                        chans = RESULT
                        DO WHILE chans~=''
                                PARSE VAR chans chan chans
                                'RAW PRIVMSG 'chan' :'line
                                'SAY /fake :'nick'!'userhost' PRIVMSG 'chan' :'line
                        END
                END
                ELSE 'SAY 'line
        END
END

EXIT
-----

It'll send any plain text to all channels, same with any /me commands, but any 
other /command goes once to each server. At some point I'll put this is a 
plugin, but it's not much for a plugin ;-)

Robin
-- 
� Phone: (+44) [0]7968 967441
� Email: [EMAIL PROTECTED]
� Web: http://www.rycochet.com/


Reply via email to