#######################################################################
#
# VoiceOnJoin vers. 1.0
#
# This TCL when is activated..on a specific channel..it scanes and when #a user joins and he is logged on X @ undernet (it can be modified for #others networks)he gets + from the BoT.When the user is not logged he #dont gets anything :)
#
# You can activate this script using the command on DCC:
# .chanset channel +VoiceOnJoin
#
# BLaCkShaDoW Productions @ #TcL-HeLp
#######################################################################
# Here you can set the message that the bot gives to the user who is
# logged on
set message "I noticed that you are logged on..so you will receive voice on this chan !"
#Here you can set the message that the bot gives to the user who is not #logged on
set noxmessage "I noticed that you are not logged..on so you can`t get voice.Please go on #usernames to create your own user !"
#Here you can set your host from your IRC channel Service
set xlog "undernet.org"
#### Do NOT MODIFY ! If you dont know what you are doing #####
setudef flag VoiceOnJoin
bind join -|- "* *" voice
proc voice {nick host hand chan } {
global botnick message xlog noxmessage
if { [channel get $chan VoiceOnJoin] } {
if {![botisop $chan]} { return 0 }
if {[onchan $nick $chan]} {
set mask [getchanhost $nick $chan]
if {[string match *$xlog* [string tolower $mask]]} {
putquick "NOTICE $nick :$message"
putquick "MODE $chan +v $nick"
} else { putquick "NOTICE $nick :$noxmessage" }
}
}
}
putlog "VoiceOnJoin by LaCkShaDoW Loaded !"
Ok there is a small bug in this script, if the person is logged in X but not using +x this script wont voice that person. The script should work for all those people who are logged in X, so it really shouldnt matter whether he is +x or not, so the author should use RAW instead of getchanhost.
I am currently a little busy when I am free I can fix this script and update it elseif anyone else who has time can do this.
nice script..i am recently using it with my bot..but there's this bug i found..when the user got disconnected and rejoins the channel, the bot still voices the user even if not logged to X anymore..the bot keeps log of the nick and recognize it as if the user is still logged to X and voice the user..
I`ve tested it there is no bug with the script the user dont gets voice when he disconnect and get connected again and not logged. Please verify that the user that gets voice doesnt has autovoice on chan
ok..it works when the user quits and connect and rejoins the channel..but how about if the user just part the channel and rejoin later?tried that and it does voice the user even not logged to X..
i think it only works when the user quits..but when user gets the following errors:
Read error: Operation timed out
Read error: Connection reset by peer
Read error: EOF from client
Ping timeout
the bot will still voice the user when it rejoins the channel and not logged to X..
no, the bot doesnt voice if the user parts and rejoins unlogged..or if the user quits and rejoins unlogged. The user gets voice *only* if he joins
logged with +x or without on the specific chan ! Else the bot never gives
voice if the user isn`t logged to the channel service it`s tested