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.

Trigger text to User

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Trigger text to User

Post by Fraud »

Hello. I am looking for a script that send a text to a user.
e.g.: !help nicki
output: nicki heresometext

Thanks for the help
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

Code: Select all

bind pub - !help text_proc

proc text_proc { nick uhost hand chan arg } {
        set nniicckk [lindex [split $arg] 0]
        if {[onchan $nniicckk $chan]} {
                putquick "PRIVMSG $chan :$nniicckk heresometext"
        }
}

putlog "whatever.tcl loaded"
? ? ;p
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Post by Fraud »

Thank u. so if i would implement all together 4 triggers? do i have to repeat this always or is there a easier way?!
Thanks
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

here is a "event to proc":

Code: Select all

bind pub - !help text_proc
in the easiest way:
bind pub - <command from chan> <proc_for_this_command>

but after binding the proc, u can parse data from $arg,
in $arg landing all data which is after !help trigger, !help <arg0> <arg1> <arg2> <argN>

etc etc, its a long story, read some tutorial about TCL and eggdrop, there is all what u need :)

TCL commands manual:
8.4 - http://www.tcl.tk/man/tcl8.4/TclCmd/contents.htm
8.5 - http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm
eggdrop procs, commands - http://www.eggheads.org/support/egghtml ... mands.html

And many other tutorials step by step around the google :P

cheers
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Post by Fraud »

Well tomekk. thats why i am in request not in help, I have no clue how to
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

yeah cool, just a hint ^^
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Post by Fraud »

Du bist ja n held.
Post Reply