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.
Old posts that have not been replied to for several years.
ex
Voice
Posts: 14 Joined: Wed May 18, 2005 11:04 pm
Location: Chicago
Post
by ex » Tue Jun 07, 2005 10:56 pm
Code: Select all
proc Server {channel clientaddr clientport} {
putlog "Connection from $clientaddr registered"
puts $channel "[channels]"
close $channel
}
socket -myaddr "cyberscripters.org" -server Server 63322
i have this out of a manual. but my problem is, that the eggdrop crashs when rehashing with the errormessage, that this port is already mapped.
is there a command like info exists for ports?
or should i first try to reach the port and only if closed open it again?
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Wed Jun 08, 2005 1:08 pm
You could use the "catch" command to catch the error. Or use "info exists" with another variable like "already_loaded" and set it when your script is loaded.
Galadhrim
Op
Posts: 123 Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede
Post
by Galadhrim » Thu Jun 09, 2005 2:22 pm
the system often has a timeout perioud before actually releasing the socket, because a) someone might be trying to send data to the socket and its on its way b) a local program might be trying to send data to the other end and it hasnt been accepted yet so it waits for a conformation.
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sun Jun 12, 2005 3:01 pm
when you rehash the bot trys to rebind on the same port which could cause a crash => try this
Code: Select all
if {[catch {socket -myaddr "cyberscripters.org" -server Server 63322} s]} {
putlog "Already binded to cyberscripters.org:63322"
} else {
putlog "Binded to cyberscripters.org:63322"
}
like stdragon suggests
XplaiN but think of me as stupid