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.

<botnick>, <command> - Tcl?

Old posts that have not been replied to for several years.
Locked
J
Jas0n

<botnick>, <command> - Tcl?

Post by Jas0n »

How would i produce something like this in TCL?

[Jason] bot, hello
[bot] Hi

Want the commands to be accessed like..

<botnick>, <command>

If anyone knows how please post!

Thanks,
Jas0n
[/code][/quote]
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

I would do a pubm bind on "*", then compare it to "${::botnick}," inside the proc.

Wcc
J
Jas0n

tcl?

Post by Jas0n »

so what would the tcl look like then??
g
guppy
eggdrop engineer
Posts: 199
Joined: Mon Sep 24, 2001 8:00 pm
Location: Canada
Contact:

Post by guppy »

Code: Select all

bind pubm - "% %,*" pubm:botnick

proc pubm:botnick {nick uhost hand chan arg} {
  if {[scan $arg "%\[^,]," somenick] && [isbotnick $somenick]} {
    <your code here>
  }
  return 0
}
something like that probably.

[/code]
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Except:

Code: Select all

  if {[scan $arg "%\[^,]," somenick] && [isbotnick $somenick]} { 
should be

Code: Select all

  if {[scan $arg "%\[^,\]," somenick] && [isbotnick $somenick]} { 
Wcc
Locked