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.

tcl help please...

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

Post by Acolyte »


Number of words to count: xx

wanting to get my bot to spit out the "xx" part to a private channel. Anyone help? Thanks
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

You need to provide more info. I.e. where does the "Number of words to count: xx" string come from? A channel? A private message?
A
Acolyte

Post by Acolyte »

Number of words to count: xx comes from a private channel by a bot. I want my bot to repeat the "xx" to the private channel as well.
T
TriPpen^KiSs

Post by TriPpen^KiSs »


set pivartchan "#chan"

global privartchan
set count "XX"
puthelp "PRIVMSG $privartchan :what you want it to say"

you need to give more info about the value and what you want it to do.. so we can help you

Kissmine
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Code: Select all

# Set the channel where "Number of words to count: xx" is said on here.
set numberofwords_setting(source) "#chan1"

# Set the channel where "xx" should be repeated to here.
set numberofwords_setting(dest) "#chan2"

bind pubm - "$numberofwords_setting(source) *" pubm:parsexx

proc pubm:parsexx {nick uhost hand chan text} {
  global numberofwords_setting
  if {[regexp {Number of words to count: ([0-9][0-9])} $text match number]} {
    putserv "PRIVMSG $numberofwords_setting(dest) :$number"
  }
}
<font size=-1>[ This Message was edited by: Wcc on 2002-02-27 16:21 ]</font>
Locked