egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Test gameports

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
demetrius_reis
Halfop


Joined: 10 Aug 2010
Posts: 42

PostPosted: Sat Nov 23, 2013 12:03 pm    Post subject: Test gameports Reply with quote

Code:
# results format
set nickchan "nick/#chan"

# channel
set scanchan "#agemania"

# inform ports
set port "2300 47624"

bind join - * scan
bind join - !scan

set ver "v1.0"

proc scan {nick uhost hand chan} {
global botnick nickchan port scanchan
set scanport [lindex [split $uhost @] 1]
set scanportfound ""
if {([lsearch -exact [string tolower $scanchan] [string tolower $chan]] != -1)} {
catch {socket $scanport $port} sport
if {([string range $sport 0 3] == "sock") && ([lindex $sport 1] == "")} {
close $sport
lappend scanportfound "1"
}
if {$scanportfound == ""} {
set scanportfound "0"
}
if {[string match $scanportfound [string tolower 1]]} {
putserv "PRIVMSG $nickchan :Nick <$nick> Host <$scanport> Port <$port> Chan <$chan>"
return
  }
 }
}



This script is based on testing whether the user who entered the channel is suspect anyway, then automatically evaluates eggdrop its doors as discrimidas. But I would like to modify in order to assess whether the specific ports show that the user is ready to play.

example: !scan <ip address>
Thus eggdrop replies doors are liberated to play, otherwise it answers no.

Can anyone help finalize?
Thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber