IRCSpy Add-On for a bot

By PuNkTuReD on Apr 08, 2008

any feedback on this short ircspy script would be appreciated :)

this will spy on the whole channel and show joins,parts,quits,nick changes,mode changes,kicks and bans.( and hopefully snotices - untested )
;to start type !chanspyon (#channel-To-SpyOn)
;to stop type !chanspyoff
;to make the bot talk to the room type : ! hi

this will spy on only 1 nick and relay what they have said to your channel
;to start type !spyon (nick) (#channel-Nick-IsIn)
;to stop type !spyoff

open your scripts editor
add the code into your remotes section

then click menu-IRCSpy add your channel name

on *:load: {
  echo -at Welcome To IRCSpy Bot Add-On Written By PuNkTuReD
  echo -at Set yourself as owner by going to: menu->IRCSpy->SetBotsOwner
  echo -at Set the bots users by going to: menu->IRCSpy->SetBotUser
  echo -at Set your room name by going to: menu->IRCSpy->SetYourRoomName ( this is the room your bot will relay everything to )
  echo -at To start spying type: !chanspyon #channel_name
  echo -at To stop spying type: !chanspyoff
  echo -at to talk through your bot type: ! hi
}
on 5:text:*:*: {
  if ($$1 = !spyon) {
    set %spy ON
    set %spynick $$2
    set %spychannel $$3
    join %spychannel
    msg %botchan 4IRC12Spy is now spying on4 %spynick 12in4 %spychannel 
  }
  if ($$1 = !spyoff) {
    part %spychannel
    set %spy OFF
    set %spynick OFF
    set %spytext OFF
    set %spychannel OFF
    msg %botchan 4IRC12Spy Is Now Set To 4OFF 
  }
  if ($$1 = !chanspyon ) {
    set %chanspy ON
    set %chanspy_chan $$2
    join $$2
    msg %botchan 4IRC12ChanSpy is now spying on4 %chanspy_chan
  }
  if ($$1 = !chanspyoff) {
    part %chanspy_chan
    set %chanspy OFF
    set %chanspy_nick OFF
    set %chanspy_text OFF
    set %chanspy_chan OFF
    set %chanspy_action OFF
    set %chanspy_action_nick OFF
    set %last_join OFF
    set %last_part OFF
    set %last_quit OFF
    set %chanspy_snotice OFF
    msg %botchan 4IRC12ChanSpy Is Now Set To 4OFF
  }
  if ($$1 = !) {
    msg %chanspy_chan $2-
    msg %botchan $me 12-4>12 $2-
  }
}
on *:text:*:#: {
  if ($nick = %spynick) {
    set %spytext $1-
    msg %botchan 4 %spynick said 12-4>12 %spytext ... 4on %spychannel
  }
  if ($chan = %chanspy_chan) {
    set %chanspy_nick $nick
    set %chanspy_text $1-
    msg %botchan 4 %chanspy_nick 12-4>12 %chanspy_text . 
  }
}
on *:action:*:*: {
  if ($chan = %chanspy_chan) {
    set %chanspy_action_nick $nick
    set %chanspy_action $1-
    msg %botchan 4 %chanspy_action_nick 12 %chanspy_action ... 
  }
}
on 1:nick: {
  if ($nick == %spynick) {
    set %spynick $newnick
    msg %botchan $nick tried to evade us by changing their nick to $newnick 
  }
  if ($newnick ison %chanspy_chan) {
    msg %botchan 4 $nick changed their nick to $newnick
  }
}
on 1:mode:%chanspy_chan: {
  msg %botchan 9 $nick changed $chan mode to $1- 
}
on *:join:#: {
  if ($chan = %chanspy_chan) {
    set %last_join $nick
    msg %botchan 9 %last_join has joined %chanspy_chan
  }
}
on *:part:%chanspy_chan: {
  if ($chan = %chanspy_chan) {
    set %last_part $nick
    msg %botchan 9 %last_part has left %chanspy_chan
  }
}
on 1:quit: {
  if (%chanspy = ON) {
    set %last_quit $nick
    msg %botchan 9 %last_quit has quit from %chanspy_chan
  }
}
on *:snotice:*: {
  if ($chan = %chanspy_chan) {
    set %chanspy_snotice $1-
    msg %botchan %chanspy_snotice
  }
}
on *:kick:%chanspy_chan: {
  msg %botchan 9 $knick was kicked by $nick ( $1- )
}
on *:ban:%chanspy_chan: {
  msg %botchan 9 $banmask was banned by $nick ( $1- )
}
menu menubar {
  IRCSpy
  .SetBotsOwner:/guser -a 10 $$?"Bot Owners Nick"
  .SetBotUser:/guser -a 5 $$?"Bot Users Nick" 
  .SetYourRoomName:/set %botchan $$?"Your Channel Name - Include The #"
}

Comments

Sign in to comment.
PuNkTuReD   -  May 05, 2008

firstly this is a bot script
secondly i had made a mistake in the code and its fixed now

hope this helps if not let me know

www.sassirc.com

 Respond  
ISM   -  May 03, 2008

i have add to ur script to remot but, i have also add my room example #legend but when i type !chanspyon i am getting message as
*/guser: insufficent parameters and i dont what is it means, i dont what i am doing wrong if u could help me out.
thanks

 Respond  
ISM   -  May 03, 2008

i have add to ur script to remot but, i have also add my room example #legend but when i type !chanspyon i am getting message as
*/guser: insufficent parameters and i dont what is it means, i dont what i am doing wrong if u could help me out.
thanks

 Respond  
PuNkTuReD   -  Apr 09, 2008

ok updated , now spy on a whole channel .
shows joins, parts, quits, kicks, bans, mode changes, nick changes and hopefully snotices ( untested )

thanks heaps for your comments

 Respond  
Jonesy44   -  Apr 08, 2008

well tbh, if u think about it, it will make no sense, all you will see is some guy chatting to him/herself

:s

perhaps u shud spy a channel as a whole, and Bold a users text or something?

 Respond  
^Neptune   -  Apr 08, 2008

It\'d be nice if it relays joins, kicks, modes, notices.. etc.

 Respond  
Jonesy44   -  Apr 08, 2008

u no longer need the bit in the admin trigger now :P

 Respond  
Jonesy44   -  Apr 08, 2008

problem lol. U need to make a seperate trigger for the person ur spying on cos atm u got it on admin text

 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.