egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

irccloud banmask
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
simo
Master


Joined: 22 Mar 2015
Posts: 251

PostPosted: Tue Jul 24, 2018 3:33 am    Post subject: Reply with quote

tested again it seems to work for

SlMO Sets Mode on #Test to: +b *!*uid306017@id-306017.charlton.irccloud.com

@Cappuccino Sets Mode on #Test to: -b+b *!*uid306017@id-306017.charlton.irccloud.com *!*uid306017@*


but not for

SlMO Sets Mode on #Test to: +b *!*@id-306017.charlton.irccloud.com
@Cappuccino Sets Mode on #Test to: -b *!*@id-306017.charlton.irccloud.com


since last one has ident in host as well wich is the same as having it set with ident as well in other words if possible it would help if it would set ident as well when +b *!*@id-306017.charlton.irccloud.com is set to trigger as well since it has unique id of user in it as well

other than that it seems fine

thank you caesar


Last edited by simo on Tue Jul 24, 2018 3:46 am; edited 1 time in total
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3489
Location: Area 51

PostPosted: Tue Jul 24, 2018 3:42 am    Post subject: Reply with quote

Nothing happens on:
Code:

SlMO Sets Mode on #Test to: +b *!*@id-306017.charlton.irccloud.com
@Cappuccino Sets Mode on #Test to: -b *!*@id-306017.charlton.irccloud.com

for two reasons:

#1. If you look at this example you gave earlier (1-2 pages back):
Code:

[19:08] * Joins: OnT (uid1420156@id-140156.ealing.irccloud.com)
[19:10] * user1 sets mode: +b *!*@id-140156.ealing.irccloud.com

you will notice that the number in uid1420156 is not equal with the number taken from id-140156.ealing.irccloud.com, meaning 1420156 is not equal with 140156.

Is this a copy/paste mistake or something?

#2. From the snippet I posted about Identifying users the user can start with uid (for example uid123456) for regular members and sid (for example sid123456) for paid users, so what should you ban in this case?

When placing a ban on *!*@id-306017.charlton.irccloud.com we can lookup what members match this address but what if it matches multiple members? You didn't want that.

I guess we can lookup what members have uid306017 or sid306017 in their user, but what if it also matches more than one member?

To make it trigger on bans like: *!*@id-306017.charlton.irccloud.com or *!*uid306017@id-306017.charlton.irccloud.com try it with replacing:
Code:

if {[regexp {\d+} $u x]} {
   if {[regexp {id-(\d+).(.*?).irccloud.com} $h - y]} {
      if {[string equal $x $y]} {
         pushmode $ch +b "*!$u@*"
      }
   }
}

with:
Code:

if {[regexp {id-(\d+).(.*?).irccloud.com} $h - x]} {
   foreach n [chanlist $ch] {
      if {[isbotnick $n]} continue
      if {[isop $n $ch] || [isvoice $n $ch] || [validuser [nick2hand $n]]} continue
      scan [getchanhost $n $ch] {%[^@]@%s} user host
      if {[regexp {\d+} $user y]} {      
         if {[string equal $x $y]} {
            pushmode $ch +b "*!$user@*"
         }
      }
   }
}

Or even better can add another regexp that will first check if the user part in the ban matches the sid/uid pattern and set a ban on whatever is there, basically triggering on *!*uid306017@id-306017.charlton.irccloud.com or *!uid306017@1.2.3.4 and setting a ban on *!*uid306017@* or *!uid306017@* respectively instead. So, the code becomes:
Code:

if {[regexp {[su]id\d+} $u]} {
   pushmode $ch +b "*!$u@*"
} elseif {[regexp {id-(\d+).(.*?).irccloud.com} $h - x]} {
   foreach n [chanlist $ch] {
      if {[isbotnick $n]} continue
      if {[isop $n $ch] || [isvoice $n $ch] || [validuser [nick2hand $n]]} continue
      scan [getchanhost $n $ch] {%[^@]@%s} user host
      if {[regexp {\d+} $user y]} {     
         if {[string equal $x $y]} {
            pushmode $ch +b "*!$user@*"
         }
      }
   }
}

Haven't tested anything so let me know the results.
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 251

PostPosted: Tue Jul 24, 2018 7:34 am    Post subject: Reply with quote

tested it seems to work as intented

tnx caesar much apreciated
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber