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.

Relay Botnet Script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
C
CoCooner
Voice
Posts: 3
Joined: Mon Feb 09, 2009 1:24 pm

Relay Botnet Script

Post by CoCooner »

Hello

I'd like a relay script where I can set it only reacts to certain words and the whole still has a botnet to another irc network posts

I have already searched archives but unfortunately not found the script to respond to certain words could


msl i have this but i want it in tcl ;)

Code: Select all

on *:TEXT:Hello:#Channel1:{
  if ($nick == AnyNick) && ($network == Network1) {
    var %a = 1
    while ($scon(%a)) {
      if ($scon(%a).network == Network2) {
        scon %a msg #Channel2 $1-
      }
      inc %a
    }
  }
}



it would be nice if I get such a small script could write because I myself can no TCL

ever thank in advance
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

This i really didnt tested and im not sure about the proc matched:proc variable [join [lrange $arg 1 end]] if its good

If i messed something sorry, if someone will eventually test this and the script will give errors just let me know and i will fix it as quickly as i can.

The code looks horrible i know :) yet i wrote it here and didnt had time to design everything.

Code: Select all

bind PUBM - "#channel *" match:pubm

bind BOT - matched matched:proc

set temp(match) [list "something" "are whe there?"]             ;# words/phrases you want to match
set temp(network) "quakenet"                                            ;# network from where you want the bot to match the words/phrases
set temp(bot) "leafbot"                                                       ;# botnet nick of the eggdrop who will send the relayed message
set temp(relaychan) "#channel2"                                        ;# channel on which the relayed message will be displayed

proc match:pubm {nick uhost hand chan arg} {
	global temp

	if {$nick == $::botnick} { return }

	if {$::network == "$temp(network)"} {
		foreach n $temp(match) {
			if {[string match -nocase "*$n*" $arg]} {
				putbot BOT "matched $arg"
			}
		}
	}
}

proc matched:proc {from key arg} {
	global temp

	putserv "PRIVMSG $temp(chanrelay) :[join [lrange $arg 1 end]]"
}
Post Reply