This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Only -inactive

Old posts that have not been replied to for several years.
Locked
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Only -inactive

Post by Rusher2K »

How can i write this Script that it msgs only in -inactive channels ?

Code: Select all

proc pub_lol_broadcast {nick host hand chan arg} {



        set arg [charfilter $arg]



        global lol botnick



        if {![check $hand $nick $host]} {



                if {$lol(silent) == 1 || [checksilent $hand]} {return 0}



            puthelp "NOTICE $nick :You need to be identified to use this function. Type .identhelp in the partyline for more info. : \002/msg $botnick id <password>\002 or \002/msg $botnick silent <password>\002 to no more receive this warning."



                return 0



        }



        if {[llength $arg] < 1} {



                puthelp "NOTICE $nick :\002Usage:\002 [string trim $lol(cmdchar)]broadcast <text>"



                return 0



        }



        foreach c [channels] {



                if {[matchattr $hand o|o $c] && [strlwr $c] != [strlwr $chan]} {



                        puthelp "PRIVMSG $c :\00314\[\003\002$nick\002\00314\]\003 $arg"



                }



        }



}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

if a channel is +inactive, then the bot leaves it, thus the bot won't send it any messages
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Sir_Fz wrote:if a channel is +inactive, then the bot leaves it, thus the bot won't send it any messages
Not quite true... The bot leaves it, but if the channel is -n (allowing external messages), the bot will still be able to send messages to it.

This will get you started on how to modify your script to not send to +inactive channels:

Code: Select all

if {[lsearch -exact [channel info #the_channel] -inactive] != -1} {
# the channel is -inactive, safe to send messages to ...
}
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Post by Rusher2K »

in the chanfile are 70 or more chans but the bot is only in 5 channels because netbots ;) And I want all bots display msgs in the channel but wehen they msg all channels they get exxesflood.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

if {[channel get #the_channel inactive]} { 
# the channel is set to -inactive..
}
Once the game is over, the king and the pawn go back in the same box.
Locked