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.
Old posts that have not been replied to for several years.
BlackTux
Voice
Posts: 5 Joined: Fri Aug 19, 2005 8:07 pm
Post
by BlackTux » Sun Oct 09, 2005 2:19 pm
I am looking for a relay script that looks at the second string and sends to the right channel.
If it was in mIRC lingo it would be like:
Code: Select all
on *:TEXT:*:#:{
if ( music isin $2 ) /msg #music $2- | halt
if ( software isin $2 ) /msg #software $2- | halt
}
What I have so far is
Code: Select all
proc bot:relay {b k a} {
puthelp "PRIVMSG #main :$a"
}
$a is what gets sent from another bot on my botnet.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Oct 09, 2005 2:48 pm
You can use:
to get the 2nd word from the text. and
Code: Select all
if {[string equal -nocase music $word]} {
to match it.
BlackTux
Voice
Posts: 5 Joined: Fri Aug 19, 2005 8:07 pm
Post
by BlackTux » Sun Oct 09, 2005 8:16 pm
So if I wanted different strings to go to different channels I would make it like:
Code: Select all
bind bot R rmsg bot:relay
proc bot:relay {b k a} {
set word [lindex [split $a] 1]
if {[string equal -nocase music $word]}{
puthelp "PRIVMSG #main_music :$a"
}
if {[string equal -nocase movies $word]}{
puthelp "PRIVMSG #main_movies :$a"
}
}
Is that correct? Sorry for being Green when it comes to TCL I am used to mIRC scripts.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Oct 10, 2005 5:26 am
Try whatever you write and see.
BlackTux
Voice
Posts: 5 Joined: Fri Aug 19, 2005 8:07 pm
Post
by BlackTux » Tue Oct 18, 2005 10:44 pm
I am wondering if it has to do wtih the flags on the two bots.
Bot1 (bot sending info) has Bot2 added with flags +h
Bot2 (bot recieving info) has Bot1 added with flags +h
Do I have to use the console command?
Do I have the right flags set?
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Wed Oct 19, 2005 7:28 am
are you considering that the first word actually will be $k and $a will be the 2nd to the last word, so maybe your keyword is the first word in $a?
relationg your flags question:
Code: Select all
(A) BIND TYPES
...
(18) BOT
...
flags are ignored.
if the bots are linked, and command matchs, it will trigger.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...