I would like my bot to greet everyone that comes in to my channel like so:
(..notice..) KinKs: Welcome Neokenzo you're visitor 227748 since Nov 1999. Please ask your question in channel (no need to ask if you can ask:) and someone will help as soon as they can. To view available help topics, type !help.
I think that is a personalised tcl. I dont actually need the !help. I would like the Welcome $name, counter since a set date and notice that I can edit. Anyone knows of such tcl or can help me code one?
set joins "joins.dat"
set date "April 10 2003"
bind join - "*" the:counting
proc the:counting {nick uhost handle chan} {
if {$nick == $::botnick} { return }
if {![file exists $::joins]} {
putlog "$::joins file dosen't exist, creating file.."
set file [open $::joins w]
puts $file "0"
catch {close $file}
}
set file [open $::joins r]
set tilnow "[gets $file]"
catch {close $file}
set file [open $::joins w]
puts $file "[expr $tilnow + 1]"
set tilnow [expr $tilnow + 1]
catch {close $file}
putserv "NOTICE $nick :You are person number \002$tilnow\002 to join $chan since $::date. Please ask your question in channel (no need to ask if you can ask:) and someone will help as soon as they can. To view available help topics, type !help."
}
Once the game is over, the king and the pawn go back in the same box.
set joins "joins.dat"
set date "11 April 2003"
set chan "#testchannel"
bind join - "*" the:counting
proc the:counting {nick uhost handle chan} {
if {$nick == $::botnick} {return}
if {!file[file exists $::joins]} {
putlog "$::joins file doesnt exists, creating file..."
set file [open $::joins w]
puts $file "0"
catch {close $file}
}
set file [open $::joins r]
set tilnow "[gets $file]"
catch {close $file}
set file [open $::joins w]
puts $file "[expr $tilnow + 1]"
set tilnow [expr $tilnow + 1]
catch {close $file}
putserv "NOTICE :12Welcome $nick to #testchannel, you're visitor number \002$tilnow\002 to join $::chan since $::date. Please be aware that #testchannel is NOT a place for any form of swearing/cursing/profanity, personal attacks/flames, harassments or threats. Thank you and do enjoy your stay :)"
}
In that notice thing don't put "#testchannel" put instead "$chan" cos will say the channel he is only running wich is in fact #testchannnel.
Also, for bold use \002something with bold\002 and for colours use \003colour some text\003 (eg. \0034bla\003 will say bla with a red colour).
Once the game is over, the king and the pawn go back in the same box.
set joins "joins.dat"
set date "11 April 2003"
set counting "#testchannel"
bind join - "*" the:counting
proc the:counting {nick uhost handle chan} {
if {$nick == $::botnick || $chan != $::counting } {return}
if {![file exists $::joins]} {
putlog "$::joins file doesnt exists, creating file..."
set file [open $::joins w]
puts $file "0"
catch {close $file}
}
set file [open $::joins r]
set tilnow "[gets $file]"
catch {close $file}
set file [open $::joins w]
puts $file "[expr $tilnow + 1]"
set tilnow [expr $tilnow + 1]
catch {close $file}
putserv "NOTICE :12Welcome \003$nick\003 to $chan, you're visitor number \002$tilnow\002 to join $chan since $::date. 3Please be aware that $chan is NOT a place for any form of swearing/cursing/profanity, personal attacks/flames, harassments or threats. Thank you and do enjoy your stay :)"
}
putlog "Join Counter Notice loaded!"
##### EOF #####
I assume the 'set counting "#testchannel"' that I cant put a capital T right? And its trying to send notice to all the channels that the bot is in because whenever somebody joins other channels, the error message comes out. How can I make it to notice just this 1 channel?
I really appreciate your help but unfortunately I still need more to solve this problem.
putserv "NOTICE :12Welcome \003$nick\003 to $chan, you're visitor number \002$tilnow\002 to join $chan since $::date. 3Please be aware that $chan is NOT a place for any form of swearing/cursing/profanity, personal attacks/flames, harassments or threats. Thank you and do enjoy your stay :)"
putserv "NOTICE $nick :12Welcome \003$nick\003 to $chan, you're visitor number \002$tilnow\002 to join $chan since $::date. 3Please be aware that $chan is NOT a place for any form of swearing/cursing/profanity, personal attacks/flames, harassments or threats. Thank you and do enjoy your stay :)"
and should be working fine like it dose at me.. Oh, and now you can put how many capital letters you want..
Once the game is over, the king and the pawn go back in the same box.
I did the changes. Still having problems. Its still trying to notice all the channels instead of just the one. Now wehenever someone comes in to any of the channel its in, this message come out in the bot's partyline:
Tcl error [the:counting]: called "the:counting" with too many arguments
set joins "joins.dat"
set date "11 April 2003"
set counting "#Testchannel"
bind join - "*" the:counting
proc the:counting {nick uhost handle chan} {
if {[string tolower $nick] == [string tolower $::botnick] || [string tolower $chan] != [string tolower $::counting] } { return }
if {![file exists $::joins]} {
putlog "$::joins file doesnt exists, creating file..."
set file [open $::joins w]
puts $file "0"
catch {close $file}
}
set file [open $::joins r]
set tilnow "[gets $file]"
catch {close $file}
set file [open $::joins w]
puts $file "[expr $tilnow + 1]"
set tilnow [expr $tilnow + 1]
catch {close $file}
putserv "NOTICE $nick :12Welcome \003$nick\003 to $chan, you're visitor number \002$tilnow\002 to join $::chan since $::date. 3Please be aware that $chan is NOT a place for any form of swearing/cursing/profanity, personal attacks/flames, harassments or threats. Thank you and do enjoy your stay :)"
}
putlog "Join Counter Notice 1.0 by loaded!"
##### EOF #####
My is running eggdrop version 1.6.13 on Linux 2.4.19-grsec if its anyhelp to you. Thanks again for you help dude.
I have rehashed and restart the bot. Still having the same problems. I'm a newbie when it comes to coding, so I'm not quite sure whats wrong with it. Can anyone check the code I've included and give me suggestions how to rectify this problem?