#############################
## ##
## iNFERiON's Greet Script ##
## v1.0 - 12/08/2005 ##
## ##
#############################
## INFO
##
## This script will greet anyone who joins the channel with a specified line, depending on the hour of the day.
## This way you can let your bot say "Good morning/afternoon/evening/night". You can offcourse also use other greets.
## Note that the time settings in your eggdrop.conf file must be set correctly for this script to work properly.
##
## Short explanation of the strings:
##
## Use $nick to have the bot say the joining users's nickname
## Use $chan to have the bot say the name of the channel the user is joining
##
## For example: JohnDoe joins #foobar and the bot is set to say "Good morning $nick, welcome to $chan !" it will say:
## "Good morning JohnDoe, welcome to #foobar !"
##
## END OF INFO
bind join - * inf_greet
#########################
## CONFIGURATION START ##
#########################
# Enter the botmaster hostname here, the botmaster will be greeted with a special line =)
set mhost "~yourident@your.host.here"
# Enter the special line the botmaster should be greeted with
set mmsg "I bow to my master $nick"
# The greet to be used between 00:00 and 06:00
set ngreet "Good night $nick, welcome to $chan"
# The greet to be used between 06:00 and 12:00
set mgreet "Good morning $nick, welcome to $chan"
# The greet to be used between 12:00 and 18:00
set agreet "Good afternoon $nick, welcome to $chan"
# The greet to be used between 18:00 and 00:00
set egreet "Good evening $nick, welcome to $chan"
# Alternative greet, in case the bot is unable to determine what time it is (unlikely, but just to be sure ;))
set altgreet "Hello $nick, welcome to $chan"
#######################
## CONFIGURATION END ##
## DO NOT EDIT BELOW ##
#######################
proc inf_greet {nick host handle chan} {
if {$host == $mhost} {
putmsg $chan $mmsg
} else {
if {$nick != $botnick} {
set time [clock format [clock seconds] -format "%H"]
if {$time < 06} {
putmsg $chan $ngreet
} elseif {$time <= 11} {
putmsg $chan $mgreet
} elseif {$time <= 17} {
putmsg $chan $agreet
} elseif {$time >= 18} {
putmsg $chan $egreet
} else {
putmsg $chan $altgreet
}
unset time
}
}
}
Ehlanna wrote:I am still learning how to code in tcl, but I thought that you had to use putmsg $chan : $egreet - i.e., include a colon.
If you wanted people to test your script then you should've said so and not put it in a way as if you've released this script out to the public. Also, you can easily test it yourself, it's not that big or complicated script.
Edit: reply was for iNFERiON not Ehlanna.
Last edited by Sir_Fz on Sun Dec 11, 2005 12:45 pm, edited 1 time in total.
Ehlanna wrote:I am still learning how to code in tcl, but I thought that you had to use putmsg $chan : $egreet - i.e., include a colon.
If you wanted people to test your script then you should've said so and not put it in a way as if you've released this script out to the public. Also, you can easily test it yourself, it's not that big or complicated script.
@Sir_Fz: Ehlanna is not supposed to be the original poster
@Ehlanna: no, no :, take a look at alltools.tcl. this is not putquick/putserv/puthelp ^-^.
nice script but can it be done so the bot tells a new visitor he is the xxxx number to visit the cannel and to tell a returning visitor that he has been here be for x number of times and was last here on such and such a date
i.e
new visitor= <13@Zeon> Welcome krbhhr! You're visitor #13050 to join #chat-room Since 03 December 05.
returning visitor= <13@Zeon> Welcome Back vghgcghc. Last time you joined #chat-room was on 12/10/2005, 11hrs 34mins 47secs ago. (Your total visits: 3)
at the moment im usin a mrc script
Last edited by drfox on Sun Dec 11, 2005 9:22 am, edited 1 time in total.
Thank you Alchera and Sir_Fz - I do not think I have found all of those links as yet, so will go have a peek. My updates to the eggdrop I have inherited seem to be ok thus far, only a couple of um .... typos dropping in here and there.
seems a good idea, but the internets a worldwide thing. wont it say the wrong message 75% of the time? im in the u.k, and it would bug me if everytime i joined a channel in the morning, the bot said "good evening"