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.

help channel command script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
m
minted
Halfop
Posts: 64
Joined: Wed Jul 20, 2005 9:58 am

help channel command script

Post by minted »

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.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

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
m
minted
Halfop
Posts: 64
Joined: Wed Jul 20, 2005 9:58 am

Post by minted »

ty :)
works like a charm

edit: just noticed this is active in all chans
can it be set to work in #help only?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Code: Select all

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."
  }
}
m
minted
Halfop
Posts: 64
Joined: Wed Jul 20, 2005 9:58 am

Post by minted »

ty :)
Post Reply