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.

What am i doing wrong

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

What am i doing wrong

Post by Ofloo »

Hmm i am trying to add some features to the netbots script, to jump servers, and show ip on dcc well features these are for personal use so ... i require it i do this stuff now from channel but i would prefer to do it from dcc over botnet haven't realy figured out yet how to script for a botnet so my question :

what am i doing wrong ??

cause the ip thing isn't showing i mean i am doing something wrong cause it only executes it local and not on the botnet, my other commands do ..

Code: Select all

bind dcc m netchange send:netchange
bind bot - netchange bot:netchange
bind dcc m netip send:netip
bind bot - netip bot:netip

proc send:netchange {handle idx arg} {
  set srv [lindex $arg 0]
  set prt [lindex $arg 1]
  set psd [lindex $arg 2]
  if {$srv == ""} {
  putdcc $idx "Syntax Error at least define a server Useage: .netchange <server> <port> <password>"
  } else {
  jump $srv $prd $psd
  }
}

proc bot:netchange {handle idx arg} {
  set srv [lindex $arg 0]
  set prt [lindex $arg 1]
  set psd [lindex $arg 2]
  if {$srv == ""} {
  putdcc $idx "Syntax Error at least define a server Useage: .netchange <server> <port> <password>"
  } else {
  jump $srv $prd $psd
  }
}

proc send:netip {handle idx arg} {
global botnick
  set MyIP "" 
  foreach a {a b c d e f g h i j k} { 
      catch { 
     set external [socket $a.root-servers.net 53] 
     set MyIP [lindex [fconfigure $external -sockname] 0] 
     close $external             
    } 
  if { ![string equal $MyIP ""] } { break } 
  }
  putdcc $idx "Botnick: $botnick BotIP: $MyIP" 
}

proc bot:netip {handle idx arg} {
global botnick
  set MyIP "" 
  foreach a {a b c d e f g h i j k} { 
      catch { 
     set external [socket $a.root-servers.net 53] 
     set MyIP [lindex [fconfigure $external -sockname] 0] 
     close $external             
    } 
  if { ![string equal $MyIP ""] } { break } 
  }
  putdcc $idx "Botnick: $botnick BotIP: $MyIP" 
}
Locked