Spy

By Tool on Mar 11, 2006

a channel spybot i have in ym, script :)

dialog spybot {
  size -1 -1 200 180
  title "Channel Spy"
  Button "Connect", 1, 4 150 75 25, default ok
  Button "Cancel", 2, 120 150 75 25, cancel
  Text "Server:", 3, 4 1 50 20, default
  Edit %spybot_server, 4, 4 15 190 20, default
  Text "Port:", 5, 4 35 50 20, default
  Edit %spybot_port, 6, 4 50 190 20, default
  Text "Nick:", 7, 4 70 50 20, default
  Edit %spybot_nick, 8, 4 85 190 20, default
  Text "First channel to join:", 9, 4 105 200 20, default
  Edit %spybot_channel, 10, 4 120 190 20, default
}

on *:dialog:spybot:sclick:1: {
  %spybot_server = $did($dname, 4)
  %spybot_port = $did($dname, 6)
  %spybot_nick = $did($dname, 8)
  %spybot_channel = $did($dname, 10)
  sockclose spybot
  sockopen spybot  %spybot_server %spybot_port
  window -e @ChannelSpy
}

menu @ChannelSpy {
  Join Channel: /sockwrite -n spybot JOIN $input(Channel to join:, 1)
  Part Channel: /sockwrite -n spybot PART $input(Channel to PART:, 1)
  -
  Quit: /sockwrite -n spybot QUIT : $+ $input(Reason:, 1) | /echo -a 14Channel Spy v1.0 Disconnected. | /timer 1 3 /window -c @ChannelSpy
  -
  Clear: /clear
}

menu status,menubar {
  -
  Channel Spy: /dialog -m spybot spybot
}

on *:input:@ChannelSpy: {
  if ($mid($1, 1 , 1) != /) {
    sockwrite -n spybot $1-
    aline @ChannelSpy Just did " $+ $1- $+ "
  }
}

on *:sockopen:spybot: {
  timer 1 4 /sockwrite -n $sockname USER %spybot_nick Channel@spy.no none none 
  timer 1 4 /sockwrite -n $sockname NICK %spybot_nick
  timer 1 5 /sockwrite -n $sockname JOIN %spybot_channel
}

on *:sockread:spybot: {
  sockread %spy_temp

  if ($window(@ChannelSpy).hwnd == $null) { window -e @ChannelSpy }

  if ( $gettok(%spy_temp, 1, 32) == PING )    { sockwrite -n $sockname PONG $gettok(%spy_temp, 2, 32) | aline -h @ChannelSpy 7[14Recived PING7] 2From: $gettok(%spy_temp, 2, 58) | .halt }
  if ( $gettok(%spy_temp, 2, 32) == PONG )    { aline -h @ChannelSpy 7[14Recived PONG7] 2From: $gettok(%spy_temp, 3, 32) | .halt }

  if ( $gettok(%spy_temp, 2, 32) == PRIVMSG ) { aline -h @ChannelSpy $replace($gettok(%spy_temp, 1, 33), :, <) $+ @ $+ $gettok(%spy_temp, 3, 32) $+ > $gettok(%spy_temp, 2-, 58)  | .halt }

  if ( $gettok(%spy_temp, 2, 32) == JOIN )    { aline -h @ChannelSpy $replace($gettok(%spy_temp, 1, 33), :, 3) has joined $replace($gettok(%spy_temp, 3, 32), :, 3) | .halt }
  if ( $gettok(%spy_temp, 2, 32) == PART )    { aline -h @ChannelSpy $replace($gettok(%spy_temp, 1, 33), :, 3) has left $replace($gettok(%spy_temp, 3, 32), :, 3) | .halt }

  if ( $gettok(%spy_temp, 2, 32) == MODE )    { aline -h @ChannelSpy 3 $+ $gettok(%spy_temp, 3, 32) -> $replace($gettok(%spy_temp, 1, 33), :, 3) sets mode $gettok(%spy_temp, 4, 32) $gettok(%spy_temp, 5, 32) | .halt }
  if ( $gettok(%spy_temp, 2, 32) == QUIT )    { aline -h @ChannelSpy $replace($gettok(%spy_temp, 1, 33), :, 2) has quit IRC ( $+ $gettok(%spy_temp, 2-, 58) $+ )  | .halt }

  if ( $gettok(%spy_temp, 2, 32) == TOPIC )   { aline -h @ChannelSpy 3 $+ $gettok(%spy_temp, 3, 32) -> $replace($gettok(%spy_temp, 1, 33), :, 3) changes topic to $gettok(%spy_temp, 2-, 58) | .halt }
  if ( $gettok(%spy_temp, 2, 32) == NICK )    { aline -h @ChannelSpy $replace($gettok(%spy_temp, 1, 33), :, 3) changed nick to $replace($gettok(%spy_temp, 3, 32), :, 3) | .halt }

  if ( $gettok(%spy_temp, 2, 32) == NOTICE ) { aline -h @ChannelSpy $replace($gettok(%spy_temp, 1, 33), :, 5) $+ @ $+ $gettok(%spy_temp, 3, 32)  -> $gettok(%spy_temp, 2-, 58) | .halt }
  ;:hva skjer a
  aline -a @ChannelSpy %spy_temp
}

Comments

Sign in to comment.
Jace   -  Oct 29, 2008

Works fine.`-.-´

 Respond  
jakobLUVSpizza   -  Oct 29, 2008

it doesnt work

 Respond  
Zybez   -  Mar 17, 2006
  • /sockwrite: \'spybot\' no such socket (line 42, script3.ini)

Whats up with that o.O???

 Respond  
globus   -  Mar 17, 2006

for me works ;]
but ip is the one for both, so not real spy :)))

 Respond  
Zybez   -  Mar 16, 2006

well why not for me :(((

 Respond  
`Kazuma   -  Mar 13, 2006

Works for me. :)

 Respond  
Zybez   -  Mar 13, 2006
  • Timer 1 activated
  • Timer 2 activated
  • Timer 3 activated
  • Timer 1 halted
  • Timer 2 halted
  • /sockwrite: \'spybot\' no such socket
  • Timer 3 halted
 Respond  
Zybez   -  Mar 13, 2006

Oh ok, works for any server???

 Respond  
Tool   -  Mar 12, 2006

Zybez, to spy ona chan and to send a chan what theyre doing in the chan you spy on. Duh. o_O

 Respond  
LiquidJesus   -  Mar 12, 2006

it\'s ok

 Respond  
Zybez   -  Mar 12, 2006

Point of this script?

 Respond  
Scruffy   -  Mar 11, 2006

ohhh nvm i put in the wrong server lol

 Respond  
Scruffy   -  Mar 11, 2006

-

  • Timer 1 activated
  • Timer 2 activated
  • Timer 3 activated
  • /sockwrite: \'spybot\' no such socket
  • Timer 1 halted
  • /sockwrite: \'spybot\' no such socket
  • Timer 2 halted
  • /sockwrite: \'spybot\' no such socket
  • Timer 3 halted

Thats all i get when i try and use it.....

 Respond  
DarthReven   -  Mar 11, 2006

I must say that this was really poorly put together. The execution was noted but there are many improvements to be made. The timers in your sockopen event aren\'t nessary and rather then using a timer to join a channel use numeric raws ie: \" if ($gettok(%spy_tmp,2,32) == 376) || ($gettok(%spy_tmp,2,32) == 422) {\" put your join event there. As to your sockread event, its really sloppy and could use some trimming. also try using elseif statements rather then if statement after if statement.

 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.