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.

multi pref want

Help for those learning Tcl or writing their own scripts.
Post Reply
a
apnihost
Voice
Posts: 8
Joined: Sun Jun 23, 2013 4:02 pm

multi pref want

Post by apnihost »

Code: Select all

pref {! @}
bind pub - ($pref)test test
proc test {nick uhost hand chan text} {
}
i make this but its not working
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

You can try using this code and then create

Code: Select all

bind PUBM - * shortcut

proc shortcut {nick uhost hand chan arg} {

	if {[string index $arg 0] in {! . `}} {
		set cmd [string range $arg 1 end]
		set cmd [lindex [split $cmd] 0]

		set arg [join [lrange [split $arg] 1 end]]
	} elseif {[isbotnick [lindex [split $arg] 0]]} {
		set cmd [lindex [split $arg] 1]
		set force [lindex [split $arg] 3]

		set arg [join [lrange [split $arg] 2 end]]
	} else { return }

	if {[info commands command:$cmd] ne ""} { command:$cmd $nick $uhost $nick $chan $arg }
}
and then create

Code: Select all

proc command:test {nick uhost hand chan arg} {
And it will work with !test `test or even BOTNICK test
Post Reply