set receiver "#Channel1"
set exemptchan "#Channel2"
proc new_join { nick uhost handle channel } {
global receiver exemptchan
set chan [string tolower $channel]
if {[lsearch -exact [channel info $chan] +join] == -1} {return 0}
if {(![botisop $channel]) || ([isop $nick $channel])} {return 0}
if {($channel != $exemptchan)} {
putserv "NOTICE @$receiver :$nick Has Joined $channel"
}
}
Here, the bot sends an opnotice to #Channel1 .. whenever an user joins the #Channel2. But I need some alteration here.. that is.. if the user who joined #Channel2 is an OP. I dont want the notification to be sent to #Channel1.
An easy solution would be to add the ops into your bot and check if they have the flag you gave'em on join (using matchattr). Send the notification only if they do not have that flag.
Well, Your idea is good one.. but the thing is.. my channel got some 80+ Ops.. Adding all the ops to bots user list.. and giving flag to all the ops.. is kinda heavy load to the bot.
Wat i feel here is.. The notification is sent well before the script checks whether they are op or not.That is.. Chanserv delayed here.So how to put a timer here.. and check whether the user is op or not. If they are op.. The notification not needed.. And if they are not op.. notification needed.
Its not sending notification if the user is an op.. But whats happening now is.. its sending notification if the user joins other channel where the bot is in.. But its not sending the notification abt the user who joins the concerned channel.
Example :-
It was supp to send notification abt the user who joins channel2 but its not sending the notification abt it.. instead its sending notification abt the user who joins other channels.
Rgds
Skipper.
P.S: If u dont mind can u pls test the script in ur eggdrop so that u wil understand the exact problem
I guess i can briefly say abt my requirement here.. so that if u dont mind.. u can alter the tcl again
Channel 1 is a help channel and have around 100+ ops. Channel 2 is the main channel. Where the actual chat goes on. If the ppl wants to get help regarding the channel2. They join channel1 and ask for help.
here, when the users join channel1 (help channel) I want a notification to be sent as opnotice to the ops of channel2. And the user who joined is an op of channel1 . The notification not needed.
This is the requirement. If u dont mind.. pls alter according to this.
There are two channels. Channel1 and channel2.. Channel2 is a help channel.. for Channel1.
So when an user joins Channel2(Help channel) Seeking for help.. The Bot should send a opnotice to #Channel1 to attend the user in #Channel2.
But if the user who joined #Channel2(help channel) is an op.. I Dont want any notification to be sent to #Channel1.
Thats it.
If u can get a script to do these functions.. pls get me one