| View previous topic :: View next topic |
| Author |
Message |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Mon Mar 13, 2006 3:12 am Post subject: help channel command script |
|
|
small request, that im sure has been asked for before, but i cant find exactly what im looking for after a forum search (so many posts to go through)
when somebody joins the #help chan, the bot notices them with "type !help for a list of commands"
on somebody typing !help the bot responds with:
help commands are as follows:
!register - to register your nick
!nick - how to change nickname
!private - how to set profile info to private
etc...
then for each !command typed, the bot replies with the how to for each command, reading it from a .txt file, or in the tcl itself(which ever is best)
i have about 10 or so different commands, but only need the 1st 2 or 3 in the code, then i can work out how to add the rest myself
i currently have this in a .mrc file, but i know how annoying it is being asked to convert from .mrc to .tcl, so i wont bother pasting it (unless u find it easier that way). everything sent by the bot should be as a notice, and using the fastest queueing type (putquick right?), as the bot is admin and wont flood off. |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Mon Mar 13, 2006 7:55 am Post subject: |
|
|
| Code: | bind pub -|- "!help" pub:help:commands
bind pub -|- "!register" pub:help:register
bind pub -|- "!nick" pub:help:nick
bind pub -|- "!private" pub:help:private
bind join -|- {*} pub:help:join
proc pub:help:join {nickname hostname handle channel} {
putquick "NOTICE $nickname :type !help for a list of commands."
}
proc pub:help:commands {nickname hostname handle channel text} {
putquick "NOTICE $nickname :help commands are as follows:"
putquick "NOTICE $nickname :!register - to register your nick"
putquick "NOTICE $nickname :!nick - how to change your nickname"
putquick "NOTICE $nickname :!private - how to set profile info to private"
}
proc pub:help:register {nickname hostname handle channel text} {
putquick "NOTICE $nickname :To register your nickname, blah blah."
}
proc pub:help:nick {nickname hostname handle channel text} {
putquick "NOTICE $nickname :To change your nickname, use /nick <nickname>."
proc pub:help:private {nickname hostname handle channel text} {
putquick "NOTICE $nickname :To set your profile info private, blah blah."
} |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Mon Mar 13, 2006 11:56 am Post subject: |
|
|
ty
works like a charm
edit: just noticed this is active in all chans
can it be set to work in #help only? |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Mon Mar 13, 2006 1:58 pm Post subject: |
|
|
| Code: | bind pub -|- !help pub:help:commands
bind pub -|- !register pub:help:register
bind pub -|- !nick pub:help:nick
bind pub -|- !private pub:help:private
bind join -|- * pub:help:join
set active #help
proc pub:help:join {nickname hostname handle channel} {
if {[string equal -nocase $channel $::active]} {
putquick "NOTICE $nickname :type !help for a list of commands."
}
}
proc pub:help:commands {nickname hostname handle channel text} {
if {[string equal -nocase $channel $::active]} {
putquick "NOTICE $nickname :help commands are as follows:"
putquick "NOTICE $nickname :!register - to register your nick"
putquick "NOTICE $nickname :!nick - how to change your nickname"
putquick "NOTICE $nickname :!private - how to set profile info to private"
}
}
proc pub:help:register {nickname hostname handle channel text} {
if {[string equal -nocase $channel $::active]} {
putquick "NOTICE $nickname :To register your nickname, blah blah."
}
}
proc pub:help:nick {nickname hostname handle channel text} {
if {[string equal -nocase $channel $::active]} {
putquick "NOTICE $nickname :To change your nickname, use /nick <nickname>."
}
proc pub:help:private {nickname hostname handle channel text} {
if {[string equal -nocase $channel $::active]} {
putquick "NOTICE $nickname :To set your profile info private, blah blah."
}
} |
|
|
| Back to top |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Mon Mar 13, 2006 2:22 pm Post subject: |
|
|
ty  |
|
| Back to top |
|
 |
|