egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help channel command script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
minted
Halfop


Joined: 20 Jul 2005
Posts: 64

PostPosted: Mon Mar 13, 2006 3:12 am    Post subject: help channel command script Reply with quote

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
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Mon Mar 13, 2006 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
minted
Halfop


Joined: 20 Jul 2005
Posts: 64

PostPosted: Mon Mar 13, 2006 11:56 am    Post subject: Reply with quote

ty Smile
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
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Mon Mar 13, 2006 1:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
minted
Halfop


Joined: 20 Jul 2005
Posts: 64

PostPosted: Mon Mar 13, 2006 2:22 pm    Post subject: Reply with quote

ty Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber