Dippy Posted January 30, 2009 Report Share Posted January 30, 2009 Hello I'm working on a connection But it seems that When I add a who or flood protection it disconnects but without these it holds well any idea's? Thanks Link to comment Share on other sites More sharing options...
Kronicdreamer Posted January 30, 2009 Report Share Posted January 30, 2009 will need to see some kinda coding on what kinda flood control you have Link to comment Share on other sites More sharing options...
The Gate Keeper Posted January 31, 2009 Report Share Posted January 31, 2009 the reason is because you might be trying to do too many things at once, and the server is disconnecting you. As mentioned... What exactly is your protection method? Link to comment Share on other sites More sharing options...
Dippy Posted February 1, 2009 Author Report Share Posted February 1, 2009 but thing is it does the same when I add Whois Link to comment Share on other sites More sharing options...
Dippy Posted February 1, 2009 Author Report Share Posted February 1, 2009 Well I throught I post the code alias localwrite sockwrite -tn sock.local $1- on *:start:sconnect alias sconnect { if ($sock(sock.local)) sockclose sock.* var %p $r(1000,9999) while (!$portfree(%p)) var %p $r(1000,9999) socklisten init.connection %p server localhost %p } on *:sockclose:sock.server:{ echo -a 4* Server disconnected. Retrying. sockclose sock.local sconnect } on *:socklisten:init.connection:{ sockaccept sock.local sockclose $sockname sockopen sock.server 24.215.5.3 6667 } on *:sockclose:sock.server:{ echo -a 4* Server disconnected. Retrying. sockclose sock.local sconnect } on *:sockread:sock.local:{ var %r | sockread %r | tokenize 32 %r if ($1 = NICK) || ($1 = USER) halt elseif ($2-) .sockwrite -n sock.server $1- return } on *:sockopen:sock.server:{ if ($sockerr) { sockclose sock.local | .timer 1 5 sconnect | halt } var %pass = %password, %l if ($len(%pass) != 32) %pass = $md5(%pass) sockwrite -n $sockname AUTHTYPE IRCWX1 sockwrite -n $sockname LOGINH %Email %pass sockwrite -tn $sockname USER $me $me $me :BLUE CONNECTION VERSON 1.0 sockwrite -n $sockname CLIENTMODE cd2 } on *:sockread:sock.server:{ var %r | sockread %r | tokenize 32 %r if ($window(@debug)) echo @debug $+(,$sockname,: $1-) if ($1 == PING) .sockwrite -n $sockname PONG $2- if ($raw == 401) { .echo -s $color(info2) $+(Error,$clr($raw),:) No such nick $clr($2) | halt } if ($raw == 403) { .echo -s $color(info2) $+(Error,$clr($raw),:) No such channel $clr($2) | halt } if ($raw == 404) { .echo -s $color(info) $+(Error,$clr($raw),:) You cant talk in $2 | halt } if ($raw == 412) { .echo $2 $color(info) $+(Error,$clr($raw),:) $2- | halt } if ($raw == 421) { .echo -s $color(info2) $+(Error,$clr($raw),:) Unknown Command $clr($2) | halt } if ($raw == 432) { .echo -s $color(info2) $+(Error,$clr($raw),:) Bad nick | halt } if ($raw == 433) { .echo # $color(info2) $+(Error,$clr($raw),:) Nick in use | halt } if ($raw == 442) { .echo -s $color(info2) $+(Error,$clr($raw),:) Your not on that channel | halt } if ($raw == 485) { .echo $2 $color(info2) $+(Error,$clr($raw),:) You are not a channel owner. | halt } if ($raw == 482) { .echo $2 $color(info2) $+(Error,$clr($raw),:) You are not op in this channel. | halt } if ($raw == 510) { .echo -a $color(info) $+(Error,$clr($raw),:) $2- | halt } if ($raw == 471) { .echo -s $color(info2) -> Knock: Cannot join $2 $clr(Room is Full) | halt } if ($raw == 473) { .echo -s $color(info2) -> Knock: Cannot join $2 $clr(Invite Only) | halt } if ($raw == 474) { .echo -s $color(info2) -> Knock: Cannot join $2 $clr(Ban) | halt } if ($raw == 475) { .echo -s $color(info2) -> Knock: Cannot join $2 $clr(Need Key) | halt } if ($2 == 353) { $remove($4-,=,:) } if ($raw == 366) { haltdef } if ($raw == 002) { haltdef } if ($raw == 003) { haltdef } if ($raw == 005) { haltdef } if ($raw == 251) { haltdef } if ($raw == 265) { haltdef } if ($raw == 315) { haltdef } if ($raw == 801) { haltdef } if ($raw == 802) { haltdef } if ($raw == 803) { haltdef } if ($raw == 820) { haltdef } if ($raw == 915) { haltdef } if ($raw == 903) { haltdef } if ($raw == 908) { haltdef } if ($raw == 914) { haltdef } if ($raw == 908) { echo 4 -t $active No permission to perform command | haltdef } if ($raw == 914) { haltdef } if ($2 == 818) { echo 4 -a * $mid($remove($1-,818,FlashIrcServer.1,$me,$chr(35),$chr(37),$chr(58),,)$1-,12,60) | halt } elseif ($2 == PRIVMSG) { var %msg = $gettok($gettok($remove($4-,[br]),2-,93),$calc($numtok($gettok($remove($4-,[br]),2-,93),91)-1),91) if ($numtok($4-,91) < 2) { %msg = $gettok($1-,2-,58) } elseif ($numtok($4-,91) >= 2) { %msg = $findtext($right($4-, -1)) } if (!%msg) { %msg = $3- } .sockwrite -n sock.local $chr(58) $+ $replace($right($gettok($1,1,33),-1),>,Guest_) $+ ! $+ $gettok($1,2,33) $2-3 $+(:, $+ %msg) } else sockwrite -n sock.local $1- } raw 352:*: { if (G isin $7) && ($me ison $2) { cline -l $color(Blue) $2 $6 } } raw 366:*: { var %chan = $2 | if ($eval(% $+ WhoChan. $+ %chan,2)) { .unset $eval(% $+ WhoChan. $+ %chan,1) | var %i = 1, %nick while ($nick(%chan,%i)) { %nick = $v1 | if (%nick != $me) { who %nick } | inc %i } } } alias findtext { var %in, %out, %a, %b, %c, %d, %f, %g, %l %in = $remove($replace($1-,$chr(32),$chr(160)),$chr(91) $+ /style $+ $chr(93),$chr(91) $+ br) $+ ] %a = 1 %b = $numtok(%in,91) %c = $numtok(%in,93) :top inc %a if (%a > %c) { %out = $replace(%d,$chr(160),$chr(32)) | return %out } %out = $gettok(%in,%a,93) if (style !isin $gettok(%out,1,91)) %d = %d $+ $gettok(%out,1,91) goto top } Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted February 1, 2009 Report Share Posted February 1, 2009 Why do you have two instances of an on sockclose event? They look like they're doing the same thing. Link to comment Share on other sites More sharing options...
The Gate Keeper Posted February 1, 2009 Report Share Posted February 1, 2009 the reason why you get it when you add the whois as well, is exactly as i said, you are trying to do too many things at once, and the server considers that flooding. You need to put a counter, so that you only perform X amount of commands per few seconds, so that the server wont kick you off. Link to comment Share on other sites More sharing options...
Dippy Posted February 2, 2009 Author Report Share Posted February 2, 2009 Why do you have two instances of an on sockclose event? They look like they're doing the same thing. Where? Link to comment Share on other sites More sharing options...
Haggis Posted February 2, 2009 Report Share Posted February 2, 2009 (edited) Here on *:sockclose:sock.server:{ echo -a 4* Server disconnected. Retrying. sockclose sock.local sconnect } on *:socklisten:init.connection:{ sockaccept sock.local sockclose $sockname sockopen sock.server 24.215.5.3 6667 } on *:sockclose:sock.server:{ echo -a 4* Server disconnected. Retrying. sockclose sock.local sconnect } Edited February 2, 2009 by Haggis Link to comment Share on other sites More sharing options...
Fanfare Posted February 2, 2009 Report Share Posted February 2, 2009 He probably inadvertently placed it there... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now