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.

Need Help

Old posts that have not been replied to for several years.
Locked
A
Acolyte

Post by Acolyte »

Not sure how to do something like this. (newbie) sorry.

---------[ End Of List (15 words) ]------------

What I want to do is make a proc that will say whats in the ( ) and the number is different each time. This is said in a channel by another bot. Any idea's? Thanks!
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

bind pubm - "% *---[ End Of List (* words) ]---*" get:words
proc get:words {nick uh hand chan arg} {
  set arg [split $arg (]
  puthelp "PRIVMSG $chan :There where [lindex [split $arg] 0] words"
}
A
Acolyte

Post by Acolyte »

Thanks ppslim, but I get this error!

There where {---------[ words

<font size=-1>[ This Message was edited by: Acolyte on 2002-01-07 15:02 ]</font>
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Try this:

Code: Select all

bind pubm - * get:words
proc get:words {nick uh hand chan arg} {
  if {[regexp {[ End Of List ((.*) words) ]} $arg match words]} {
    puthelp "PRIVMSG $chan :There where $words words"
  }
}
Locked