mIRC Home    About    Download    Register    News    Help

Print Thread
#132183 08/10/05 03:01 AM
Y
yah
yah
Y
í need something for snotice. snotice is:
XXXXXX.XXXXX.server- *** Notice -- Client connecting on port 6667: badguy (war@69.163.85.3).

can anyone help me with a code so that if there is anything before @, bot will kline the ip address or mask for example, 69.163.85.* for 150 sec?

#132184 08/10/05 03:41 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
What you're asking for will kline everyone that attempts to join the server. I suggest you re-think about what it is you actually want to do, because I doubt it if you want to kline everyone.

#132185 08/10/05 04:06 AM
O
Om3n
Om3n
O
Code:
on ^1:SNOTICE:*:{
  if ($1-8 == *** Notice -- Client connecting on port 6667:) && (*[color:red]war[/color]@* iswm $10) {
    var %addy = $mask(*! $+ $mid($10,2-,$calc($len($10)-3)),4)
    ; this will set the address in the format *!*@xxx.xxx.xxx.* to a local variable called %addy
    put KLINE command here
    ; use %addy in your kline command for the address to kline
  }
}


Change the red part to the ident of your choice, be specific. This should work, BUT i highly suggest you dont ban users based entirely on the ident used.

Also, most services support other types of klines, such as sqline sgsline and szline which allow akilling of users based on nickname, realname and mask respectively.

Last edited by Om3n; 08/10/05 05:52 AM.
#132186 08/10/05 04:20 AM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Quote:
($10 iswm *war@*)


That should be the other way round, if (*war@* iswm $10)

#132187 08/10/05 05:54 AM
O
Om3n
Om3n
O
Yep, updated, its an unfortunate habbit of mine coding iswm the wrong way around :\

#132188 08/10/05 11:38 AM
Y
yah
yah
Y
sorry! it is for any ident or anything before @ character not just for 'war' and it will be not kline but shun for 30 sec on mask/ip address.
thankz!

#132189 08/10/05 01:09 PM
O
Om3n
Om3n
O
For any ident at all? im sorry but i think that is an obsurd idea. EVERY user connecting to irc has an ident, there is NO way around it. So what you would be doing it shunning every user the second they connect, this is again an obsurd thing to do in my opinon, by shunning them how are they to identify? join channels? msg somebody?. If they can't do anything then its pointless them being connected in the first place.

In any case, if you want to shun/kline/whatever to anybody that even has an ident, then you dont need to even both checking the ident because every user will have one.

Code:
on ^1:SNOTICE:*:{
  if ($1-7 == *** Notice -- Client connecting on port) {
    var %addy = $mask(*! $+ $mid($10,2-,$calc($len($10)-3)),4)
    ; this will set the address in the format *!*@xxx.xxx.xxx.* to a local variable called %addy
    put KLINE/SHUN/WHATEVER command here
    ; use %addy in your command for the address to use or whatever
  }
}


I also altered the first if, since i assume like most ircds it allows connections on multiple ports. If you want it port specific just change the second line back to "if ($1-8 == *** Notice -- Client connecting on port 6667:) {" changing '6667' if neccersary.

#132190 08/10/05 09:09 PM
Y
yah
yah
Y
thankz Om3n. actually i wanted bot to read ident and initiate command after reading snotice:connecting....i am trying to use it for java based site where i will be able to manage to get snotice with ident and without ident. and i want a script to read the ident. if there is anything before @, script will tiger some command for example, shun. if there is nothing before @, bot won't execute any command. the code you have given, if there is any ident or no ident, it shuns the mask in both cases. can you make it like if there is no ident, there will be no shun?

#132191 09/10/05 02:58 AM
S
schaefer31
schaefer31
S
Quote:
thankz Om3n. actually i wanted bot to read ident and initiate command after reading snotice:connecting....i am trying to use it for java based site where i will be able to manage to get snotice with ident and without ident. and i want a script to read the ident. if there is anything before @, script will tiger some command for example, shun. if there is nothing before @, bot won't execute any command. the code you have given, if there is any ident or no ident, it shuns the mask in both cases. can you make it like if there is no ident, there will be no shun?


It's impossible to have no ident. Everyone has one even if it's just a single character.

#132192 09/10/05 03:19 AM
O
Om3n
Om3n
O
Indeed, the java irc ident is generally jirc by default. It is not possible to be connected without an ident. If you are recieving any sort of connect/exit server notices without the ident part then its a bug in the ircd.

#132193 09/10/05 11:06 AM
Y
yah
yah
Y
thank u again! if the ident is larger than one, what would be the code for shuning the mask for 30 sec?

#132194 10/10/05 01:21 AM
Y
yah
yah
Y
hello again! thank u! somehow i can also get snotice like this:
XXXXXX.XXXXX.server- *** Notice -- Client connecting on port 7000: WdRta (@69.163.85.3) at the same time.
can you help me with a code so that if there is anything to the left of @ (before @), bot will shun the ip address or mask for 150 sec and who wont have anything before @, script will be halted?

#132195 10/10/05 04:00 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
There will always be something on each side of the @ symbol
The users ident is before it, and their IP address (either resolved into a name or unresolved and in numerics) will be after it. It is IMPOSSIBLE to have a connection to the internet without the second part, and for IRC chatting, the first part will be there also.

Your basically just repeating what you started this topic with.

#132196 10/10/05 02:42 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
I wonder if the "ident" being used is something like Ctrl-O or whatever... basically a character that will not display, but is still acceptable as an ident. I don't know how else it's possible to get no ident.

#132197 10/10/05 10:59 PM
O
Om3n
Om3n
O
Indeed, if its not a bug in the ircd then a non-displayable charactor such as a control charactor is all i can think of. Yah, hold control when you copy/paste to keep control codes intact.

#132198 15/10/05 11:16 AM
Y
yah
yah
Y
yes you guys are right. it is some non-displayable charactor such as a control charactor they use.i have seen that. is there anyway, any script code to detect these control characters in ident?

#132199 15/10/05 11:58 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
When you get such an 'empty' ident displayed, keep ctrl pressed and select the ident and a few letters following it with your mouse. Then paste in the editbox and you should see a box, this is the control character they used, you can use $asc(character) and press tab to see the character number. In scripts you can just use that box with an isin or iswm or even just == in a /if statement.

#132200 17/10/05 01:23 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Well, here are the $chr's for the main control codes:

$chr(2) = Ctrl-B
$chr(3) = Ctrl-K
$chr(15) = Ctrl-O
$chr(31) = Ctrl-U

You can check it for those by default if you want. If it's some other code, then you'd need to find the $chr for it as mentioned above.


Link Copied to Clipboard