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.

script to send notice that @nickname trigger don't work

Old posts that have not been replied to for several years.
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

script to send notice that @nickname trigger don't work

Post by Bytez »

Hi, my bot sits in a channel where there are people serving with the @nickname commands such as autoget, omenseve, sdfind. Many times, a user does @botnick @botnick2 Is there a script that will send a notice to the user saying that the nick is not sharing when the user types @botnick @botnick2, etc etc.? Thanks.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

read tcl-commands.doc for pub binds.

this is a basic script:

Code: Select all

bind pub - @$botnick reply:share

proc reply:share {nick uhost hand chan arg} {
 puthelp "NOTICE $nick :I'm not sharing any files."
}
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

So, I can just copy and paste the code and name the file with .tcl extension and it'll work? :)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

yes, put it in a .tcl file in the eggdrop's /scripts directory

then in your eggdrop's .conf file add the line source scripts/script-name.tcl
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

thanks for the code, but often times, i have to rehash for it to work? I'm using this script on 3 bots on my botnet. Is there any extra lines/code to make it more robust?
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Bytez wrote:thanks for the code, but often times, i have to rehash for it to work? I'm using this script on 3 bots on my botnet. Is there any extra lines/code to make it more robust?
You will always have to "Rehash" your bot if you add new tcl's. as for being more robust? Usually the simpler the script the more stable it is. Or maybe i dont quite get what you mean :wink:

^DooM^
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

I have to rehash sometimes after I rehash it for the first time. It only happens to this one botnick using it, and it was the last user that I added the script to. :o
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

Sir_Fz wrote:read tcl-commands.doc for pub binds.

this is a basic script:

Code: Select all

bind pub - @$botnick reply:share

proc reply:share {nick uhost hand chan arg} {
 puthelp "NOTICE $nick :I'm not sharing any files."
}
what's pub binds? Also, when I typed @ by itself on the channel, ALL my bots with the script loaded sent me a notice with a mesage. How can I fix this and also add some flood settings? I really appreciate it, maybe it should be in the TCL archives... I'm sure many people would use this esp. on fserv channels. Thanks! :D
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

well it shouldn't reply on @ it should reply to @<botnick> , as for the pub bind, read tcl-commands.doc in the /doc dir of your eggdrop's dir.
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

I only typed @ and all of the bots with the script loaded sent me a notice. If i type @botnick only that bot will send me a notice so there must be something up with the code. :P
S
Speak-ezy

Post by Speak-ezy »

Bytez wrote:I only typed @ and all of the bots with the script loaded sent me a notice. If i type @botnick only that bot will send me a notice so there must be something up with the code. :P
Works fine for me. Only replies to @<botnick>... No notices when I just type "@"...

Thanks Sir_Fz....
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

how many bots did you load your script on? I loaded on all 8 bots on my botnet and they reply when I type @

Sir, could you tweak the code? Thanks so much.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

are u sure you have the pub bind @$botnick ?
it won't reply to @ unless the bind is bind pub - @ reply:share

so make sure it's bind pub - @$botnick reply:share
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

my code seems fine:

bind pub - @$botnick reply:share

proc reply:share {nick uhost hand chan arg} {
puthelp "NOTICE $nick :I'm a robot, NOT sharing files!"
}

:roll:
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

One possibility is that you entered the code wrong initially, changed it, rehashed (instead of restarting), thus leaving the original incorrect bind in tact and still usable...

Another possibility is that you loaded the bot from scratch and when doing so, the bot has not yet connected to irc, and botnick may be "" (empty), thus meaning that the bind would just be "@".... If this is the problem, then a better bind would be bind pub - @$nick <proc> instead.
Locked