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.

[SOLVED] Problem with bind pub + botnick format

Help for those learning Tcl or writing their own scripts.
Post Reply
c
cleaner
Voice
Posts: 15
Joined: Mon Apr 13, 2009 6:35 pm

[SOLVED] Problem with bind pub + botnick format

Post by cleaner »

Hello!

Please tell me how to change this script to use this like:

Code: Select all

bot_nick: !help
at this time it is:

Code: Select all

!help

Code: Select all

bind pub -|- !help pub_do_shelp


proc pub_do_shelp {nick host handle channel text} {

	putserv "NOTICE $nick :Public commands: !..."
}
Please answer me!
Last edited by cleaner on Sat Apr 18, 2009 1:43 pm, edited 2 times in total.
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Perhaps the reason for limited response here is that we can't really believe that you would want to change the simplicity of a !help trigger to one rather longer and more awkward.

By bot_nick: !help I assume you mean $botnick: !help rather than the literal meaning. You will need to employ a PUBM bind something like the following :-

Code: Select all

bind PUBM - * pub_do_shelp

proc pub_do_shelp {nick uhost hand channel txt} {
  global botnick
  if {[string match "$botnick\: !help" [string trim $txt]]} {
      putserv "NOTICE $nick :Public commands\: !..."
  }
}
I must have had nothing to do
c
cleaner
Voice
Posts: 15
Joined: Mon Apr 13, 2009 6:35 pm

Post by cleaner »

arfer,

Thanks, you halped me! :).

Before this I was trying something like:

Code: Select all

#bind pubm -|- "% $botnick*\!cmd" pub_do_cmd
But your sollution is understanding for me and is working! :)

Thanks man!
Post Reply