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.

VoiceOnJoin by LaCkShaDoW

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

VoiceOnJoin by LaCkShaDoW

Post by iamdeath »

Code: Select all

#######################################################################
#
# 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.

peace
iamdeath
|AmDeAtH @ Undernet
Death is only the *Beginning*...
User avatar
BLaCkShaDoW
Op
Posts: 120
Joined: Sun Jan 11, 2009 4:50 am
Location: Romania
Contact:

Post by BLaCkShaDoW »

The Tcl is done it will apear on egghelp in a few days :) thanks for the suggestion
BLaCkShaDoW Production @ WwW.TclScripts.Net
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

You're most welcome :)
|AmDeAtH @ Undernet
Death is only the *Beginning*...
s
sutkida
Voice
Posts: 12
Joined: Wed Nov 19, 2008 6:06 am

Post by sutkida »

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..
User avatar
BLaCkShaDoW
Op
Posts: 120
Joined: Sun Jan 11, 2009 4:50 am
Location: Romania
Contact:

Post by BLaCkShaDoW »

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 :)
BLaCkShaDoW Production @ WwW.TclScripts.Net
s
sutkida
Voice
Posts: 12
Joined: Wed Nov 19, 2008 6:06 am

Post by sutkida »

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..
User avatar
BLaCkShaDoW
Op
Posts: 120
Joined: Sun Jan 11, 2009 4:50 am
Location: Romania
Contact:

Post by BLaCkShaDoW »

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 :)
BLaCkShaDoW Production @ WwW.TclScripts.Net
Post Reply