Channel Spy Bot

By SnapeisntEvil on Jul 23, 2008

This is a pretty simple mIRC script that sits in a channel and copies everything that happens into another channel. This is useful for having a bot spy on a channel that you do not want to/cannot join. I have also used it for moderating purposes.

Load this file into the remotes section of your mIRC client. Chances are, if you don't know how to do this, you don't need it.

When it is loaded, simply type /spy

;Type /spy <channel to spy on> <channel to report to>
on *:TEXT:!spy*:*: {
  spy $2 $3
}
on *:TEXT:!unspy*:%spyreport: {
  unspy
}
alias spy {
  if (%spychan == $null) {
    join $1
    join $2
    set %spychan $1
    set %spyreport $2
    enable #spybot
    echo SpyBot can only work in one channel at a time.
    msg %spyreport Now sending all actions from %spychan to here.
  }
  if (%spychan != $null) {
    echo you are already spying on %spychan
    echo to stop spying, try using /unspy first
  }
}
alias unspy {
  msg %spyreport No longer spying on %spychan
  echo No longer spying on %spychan
  unset %spychan
  unset %spyreport
  disable #spybot
}
#spybot off
on *:TEXT:*:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport < $+ $nick $+ > $1-
  }
}
on *:ACTION:*:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport 6ACTION: $nick $1-
  }
}
on *:JOIN:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport 4,1JOINED: $nick
  }
}
on *:NICK: {
  if ($nick !ison %spyreport) {
    if ($nick ison %spychan) {
      msg %spyreport $nick is now known as $newnick
    }
  }
}
on *:PART:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport $nick has left %spychan
  }
}
on *:KICK:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport $knick was kicked from %spychan by $nick < $+ $1- $+ >
  }
}
on *:RAWMODE:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport $nick set mode $1- in %spychan
  }
}
on *:BAN:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport $2 has been banned from $chan by $nick
  }
}
on *:UNBAN:%spychan: {
  if ($nick !ison %spyreport) {
    msg %spyreport $2 has been unbanned from $chan by $nick
  }
}
on *:QUIT: {
  if ($nick ison %spychan) {
    msg %spyreport $nick has disconnected from the network
  }
}
#spybot end

Comments

Sign in to comment.
Pangaea   -  Jul 07, 2011

wtf? this dose NOT WORK

 Respond  
PATX   -  Mar 15, 2009

useful. gets a 7

 Respond  
SnapeisntEvil   -  Oct 27, 2008

And like xredxthornsx said, i havent actually tested this thoroughly, so if anyone finds any bugs, post a comment about it and ill fix it asap!

 Respond  
SnapeisntEvil   -  Oct 27, 2008

mmkay, so i added triggers in case this is being used by a bot (feel free to edit that part however u want to make it more secure or whatever, its just so bot owners can do spying remotely). I also fixed a spelling error that was messing up the first alias.

 Respond  
xredxthornsx   -  Sep 26, 2008

Hmmm i think he told me earlier today that he never tested the script

 Respond  
PuNkTuReD   -  Sep 26, 2008

if you cant join a channel

because of a ban, your bot will not get in either

because of your nick, just change your nick

but nice work

 Respond  
xredxthornsx   -  Sep 26, 2008

forgot about $input

 Respond  
^Neptune   -  Sep 14, 2008

Why would he need a dialog GUI when $input can do a yes/no dialog?

 Respond  
xredxthornsx   -  Sep 14, 2008

you might want to make it a trigger script for bots as well

on *:text:!spy*:#: {
/spy $1 $2
}

on *:text:!unspy*:#: {
/unspy
}

maybe make a yes no dialog to ask you if you want to set mode to +p

Instant message me snape about the dialog i know of a program that helps make dialogs ok i think i have givben all i can give i dont know if i even helped any i'm just a simple mIRC scripter and am just now getting back into IRC and mIRC

 Respond  
xredxthornsx   -  Sep 14, 2008
alias spy {
  if (%spychat == $null) {
    join $1
    join $2
    set %spychan $1
    set %spyreport $2
    enable #spybot
    echo SpyBot can only work in one channel at a time.
    mode $me +p
  }

so when it does activate it makes itself +p

alias unspy {
  echo No longer spying on %spychan
  mode $me -p
  unset %spychan
  unset %spyreport
  disable #spybot
}

maybe add a CTCP section so it replies to a certain ctcp if it is in remote mode

maybe something like

ctcp *:status:?:{
   ctcpreply $nick I am currently spying on %spychan and reporting to %spyreport
}

the above might be useless but i[m known tfor making useless stuff

 Respond  
xredxthornsx   -  Sep 14, 2008

i was going to Reply to this with a theory but my theory was flawed..

i thought if you used a @window you could have it report to the window but i thought if you were using it as a remotely hidden bot then you really wouldn't be able to see it but there might be a way to relay everything through dcc if you wanted to. Alot like manicks php bot using the monitor #channel command in DCC

 Respond  
SnapeisntEvil   -  Aug 18, 2008

thanks

 Respond  
Doodle   -  Aug 17, 2008

awesome script Phoenix

 Respond  
Cheiron   -  Aug 09, 2008

re quote from Danzo about the whois\'ing the bot to see where it is.. you can hide it easily enough depending on what client/server you are on.. if you using mIRC you are able to type /mode <bot\'s nick> +p

that will stop the whois info showing what rooms the bot is in unless you are in the same room/s that it is in, then obviously it will show them.

this /mode +p can be entered into Perform on the mIRC options menu so that on start up connect to the server it will auto mode +p itself ergo hidden :)

 Respond  
xyzzy   -  Aug 09, 2008

O-o

 Respond  
SnapeisntEvil   -  Jul 26, 2008

and in response to DaNzO, the whole point is that no one outside of %spyreport will know that its spying. Also, making the channel secret or invite-only would stop any unwanted users.

 Respond  
SnapeisntEvil   -  Jul 26, 2008

If anyone else has any comments/criticisms to make, I welcome them all...

 Respond  
SnapeisntEvil   -  Jul 26, 2008

Ok, i added a if statement to check if its already spying. I also added /unspy.
In response to LucSatise\'s 3rd statement, Yes, rawmode does cover bans, but i have another if inside of rawmode to ignore mode +/-b and then i have a \'on ban\' to add a bit more functionality to the script.

 Respond  
DaNzO   -  Jul 24, 2008

Lol, Nothing is stopping someone from /whois\'ing the Spy Bot, Finding the channel, Then Reporting it to the channel owner who the bot is spying on.

 Respond  
LucSatise   -  Jul 24, 2008

k couple of things:

  1. You should have a block so tht it doesn\'t spy if theres already a spy going on
  2. Theres no command to cancel spy
  3. By using rawmode you also shouldn\'t need ban/unban (correct me if im wrong someone)
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.