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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
-
simo
- Revered One
- Posts: 1107
- Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo »
Greetz gentz,
im wondering how to detect a single character banmask with wildcard like :
+b *a*!*@*
+b *b*!*@*
+b *c*!*@*
+b *1*!*@*
+b *2*!*@*
+b *3*!*@*
+b *{*!*@*
+b *}*!*@*
or any single character banmask with wildcard really
-
simo
- Revered One
- Posts: 1107
- Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo »
i tried this but it seems to unset every ban regardless:
bind mode - "* +b" correct:single-char-banmask
proc correct:single-char-banmask {nick uhost hand chan mc ban} {
if {[string match "\*?\*!*@*" $ban]} { putnow "mode $chan -b $ban" }
}
-
CrazyCat
- Revered One
- Posts: 1306
- Joined: Sun Jan 13, 2002 8:00 pm
- Location: France
-
Contact:
Post
by CrazyCat »
The character is alway in the nick part ?
Code: Select all
if {[regexp {\*([^\*!@]{1})\*!\*@*} $ban]} {
pushmode $chan -b $ban
}
-
simo
- Revered One
- Posts: 1107
- Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo »
this seems working but im not sure if its proper :
Code: Select all
bind mode - "* +b" correct:single-char-banmask
proc correct:single-char-banmask {nick uhost hand chan mc ban} {
if {[regexp -nocase {(\*).(\*)!(\*)@(.*)} $ban]} { putnow "mode $chan -b $ban" }
}
-
simo
- Revered One
- Posts: 1107
- Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo »
oh euhm yes it is CrazyCat
-
simo
- Revered One
- Posts: 1107
- Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo »
tested your posted code and it seems to work as expected thanks CrazyCat
-
simo
- Revered One
- Posts: 1107
- Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo »
i tested again and found it also removes banmasks like :
*mwf*u*!*@*
while we only wanted it to trigger on a single banmask character like:
+b *a*!*@*
+b *b*!*@*
+b *c*!*@*
+b *1*!*@*
+b *2*!*@*
+b *3*!*@*
+b *{*!*@*
+b *}*!*@*
or any single character banmask really
-
SpiKe^^
- Owner
- Posts: 831
- Joined: Fri May 12, 2006 10:20 pm
- Location: Tennessee, USA
-
Contact:
Post
by SpiKe^^ »
Code: Select all
regexp {^(\*).(\*)!(\*)@(\*)$} $ban
-
simo
- Revered One
- Posts: 1107
- Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo »
Thanks SpiKe^^ that seems to work as expected
thanks CrazyCat as well