version reply empty ?

These are old archives. They are kept for historic purposes only.
Locked
akin
Posts: 33
Joined: Wed Jun 22, 2005 8:41 am

version reply empty ?

Post by akin »

-> [nick] VERSION
[nick VERSION reply]

version reply is empty ? what is regex
Mark
Posts: 57
Joined: Mon Dec 26, 2005 4:01 pm

Post by Mark »

Please take a look at http://forums.unrealircd.com/viewtopic.php?t=3203

It isn't possible using a spamfilter!
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

In this case - it is possible.
There is a difference between no version reply and an empty version reply. Notice that a version string IS in fact being sent back - it simply appears to contain nothing.

(I say appears to because it could very easily consist of whitespace. Or it could use color codes to make the version text the same color as your bg color. The regex considers only the spaces-only situation. Colors can't be checked for in regexes since they get stripped.)

Code: Select all

spamfilter {
    regex "^\\x01VERSION \\s*\\x01$";
    target private-notice; // CTCP replies are sent via NOTICE.
    action kline;
    reason "Empty version string.";
};
-or-

/spamfilter + n gline - Empty_version_string. ^\x01VERSION \s*\x01$
Guest

Post by Guest »

aquanight wrote:In this case - it is possible.
There is a difference between no version reply and an empty version reply. Notice that a version string IS in fact being sent back - it simply appears to contain nothing.

(I say appears to because it could very easily consist of whitespace. Or it could use color codes to make the version text the same color as your bg color. The regex considers only the spaces-only situation. Colors can't be checked for in regexes since they get stripped.)

Code: Select all

spamfilter {
    regex "^\\x01VERSION \\s*\\x01$";
    target private-notice; // CTCP replies are sent via NOTICE.
    action kline;
    reason "Empty version string.";
};
-or-

/spamfilter + n gline - Empty_version_string. ^\x01VERSION \s*\x01$
= no

what is regex? :roll:
ARcanUSNUMquam
Posts: 17
Joined: Fri Apr 01, 2005 1:31 am
Contact:

Post by ARcanUSNUMquam »

Anonymous wrote:what is regex? :roll:
Wikipedia wrote:A regular expression (abbreviated as regexp or regex, with plural forms regexps, regexes, or regexen) is a string that describes or matches a set of strings, according to certain syntax rules.
--from http://en.wikipedia.org/wiki/Regex

Regex is like a way more powerful version of wildcards. It allows you to do text matching with a good deal of accuracy and selection. Pretty awesome.
ARcanUSNUMquam
Net Admin @ irc.allxtremenet.net
http://TwoAMProductions.net
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Well by that definition alone you could say wildcards are regexes! :P

</obligatory>
ARcanUSNUMquam
Posts: 17
Joined: Fri Apr 01, 2005 1:31 am
Contact:

Post by ARcanUSNUMquam »

But wildcards dont match the "certain syntax rules" =P
ARcanUSNUMquam
Net Admin @ irc.allxtremenet.net
http://TwoAMProductions.net
akin
Posts: 33
Joined: Wed Jun 22, 2005 8:41 am

Post by akin »

in server send /ctcp nick version

Code: Select all

spamfilter { 
    regex "\x1VERSION"; 
    target private-notice;
    action kill; 
    reason "exit."; 
};
good pozitive

but!!!!

Code: Select all

* Connecting to irc.xxxx.com (6666)
-
-irc.xxxx.com- *** Couldn't resolve your hostname; using your IP address instead
-
[IRC VERSION]
-
Welcome to the xxxx IRC Network
nick connect server negative? why?

help me pleas?
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

  1. Your regex isn't valid.
  2. Your regex is too broad and would not let ANYONE connect.
aquanight's example should work perfectly
Guest wrote:= no
Then why not? If you don't want to accept our help and give us reasons why it won't work, I see no reason to keep this topic open...
akin
Posts: 33
Joined: Wed Jun 22, 2005 8:41 am

Post by akin »

ircd edit pozitiv

Code: Select all

code removed
spamfilter negativ

WHY?

Code: Select all

in server send /ctcp nick version 
Code: 

spamfilter { 
    regex "\x1VERSION"; 
    target private-notice; 
    action kill; 
    reason "exit."; 
}; 
 

good pozitive 

but!!!! 
Code: 

* Connecting to irc.xxxx.com (6666) 
- 
-irc.xxxx.com- *** Couldn't resolve your hostname; using your IP address instead 
- 
[IRC VERSION] 
- 
Welcome to the xxxx IRC Network 
 

nick connect server negative? why? 
Dukat
Posts: 1083
Joined: Tue Mar 16, 2004 5:44 pm
Location: Switzerland

Post by Dukat »

akin, we don't support modifying the source code.
http://www.vulnscan.org/UnrealIrcd/faq/#40

Topic locked.
If you don't make mistakes, you aren't really trying.
- Coleman Hawkins
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

Code removed.
Dukat
Posts: 1083
Joined: Tue Mar 16, 2004 5:44 pm
Location: Switzerland

Post by Dukat »

:D
If you don't make mistakes, you aren't really trying.
- Coleman Hawkins
Locked