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 

cloud ip remove ident ban

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
F|irT
Voice


Joined: 30 Apr 2015
Posts: 30
Location: Pakistan

PostPosted: Thu Dec 27, 2018 12:15 am    Post subject: cloud ip remove ident ban Reply with quote

Code:
## ircCloudBan v.0.1 ##

bind mode - "#% +b" ircCloudBan

proc ircCloudBan {nk uh hn ch md banmask} {
   if {![botisop $ch]} return
   if {![string match -nocase "*.irccloud.com" $banmask]} return
       
   pushmode $ch -b $banmask ;  set ::irccloudban $banmask
}


bind kick - * ircCloudKick

proc ircCloudKick {nk uh hn ch target why} {
   if {![info exists ::irccloudban]} return

   if {[botisop $ch]} {
      set chhost [getchanhost $target $ch]

      
      if {[string match -nocase "*.irccloud.com" $chhost]} {
         lassign [split $chhost "@"] user

         
         pushmode $ch +b "*!$user@*"
         
      }
   }

   unset ::irccloudban
}


this is what i am using got from this site ... i need some help on it .

when i ban cloud ip then bots remove the ban . but did not set the ident ban .

Exp:
[09:04] * F|irT sets mode: +b *!*@id-246043.stonehaven.irccloud.com
[09:04] * NoNSt0p sets mode: -b *!*@id-246043.stonehaven.irccloud.com
[09:09] * F|irT sets mode: +b *!*@id-338795.brockwell.irccloud.com
[09:09] * NoNSt0p sets mode: -b *!*@id-338795.brockwell.irccloud.com
[09:09] * F|irT sets mode: +b *!*@id-169916.brockwell.irccloud.com
[09:09] * NoNSt0p sets mode: -b *!*@id-169916.brockwell.irccloud.com

but in kick ban it works good
exp:
[09:11] * F|irT sets mode: +b *!*@id-246043.stonehaven.irccloud.com
[09:11] * Day-Night was kicked by F|irT (F|irT)
[09:11] * NoNSt0p sets mode: -b+b *!*@id-246043.stonehaven.irccloud.com *!uid246043@*

--------------------------------------------------------------
i want when any op ban the cloud ip it does not remove the ban .
of if it can be like remove ip and get ident like it's doing on kick ban .
not doing on simple ban.

hope u underatand.

My English is weak
F|irT
Back to top
View user's profile Send private message Yahoo Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3583
Location: Mint Factory

PostPosted: Mon Jan 07, 2019 3:02 am    Post subject: Reply with quote

I see that you took this code from the first page in irccloud banmask discussion but didn't read until last page to see the offered solution that seems to work for simo. Having trouble to understand what is needed to be changed? Here is the final code with all the changes in place:
Code:

## ircCloudBan v.0.4 ##

set ircSkip {
   *.irccloud.com
   192.184.9.108
   192.184.9.110
   192.184.9.112
   192.184.10.118
   192.184.10.9
   192.184.8.73
   192.184.8.10
   2001:67c:2f08*
   2001*67c*2f08*
}

bind mode - "#% +b" ircCloudBan
bind kick - * ircCloudKick

proc ircCloudBan {nk uh hn ch md banmask} {
   if {![botisop $ch]} return
   global ircSkip
   set match 0
   scan $banmask {%[^!]!%[^@]@%s} n u h
   foreach host $ircSkip {
      if {![string match -nocase $host $h]} continue
      incr match
      break
   }
   if {$match} {
      pushmode $ch -b $banmask
      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@*"
               }
            }
         }
      }
      set ::irccloudban $banmask
   }
}

proc ircCloudKick {nk uh hn ch target why} {
   if {![info exists ::irccloudban]} return
   if {![botisop $ch]} return
   set chhost [getchanhost $target $ch]
   global ircSkip
   set match 0
   if {[scan $chhost {%[^@]@%s} u h] != 2} return
   foreach host $ircSkip {
      if {![string match -nocase $host $h]} continue
      incr match
      break
   }
   if {$match} {
      if {[regexp {[su]id\d+} $u]} {
         pushmode $ch +b "*!$u@*"
      }
   }
   unset ::irccloudban
}

_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 23

PostPosted: Wed Feb 13, 2019 2:14 pm    Post subject: Hello Reply with quote

ceasar hi, this is work only if i !kb nick same nick for the second time not at first time why ?

frist time

<@Stefano> !kb test-1
* test-1 was kicked by test (Requested (Stefano))
* test sets mode: +b *!*@test-67B691C.irccloud.com
* test sets mode: -b *!*@test-67B691C.irccloud.com

second time

<@Stefano> !kb test-1
* test-1 was kicked by test (Requested (Stefano))
* test sets mode: +b *!*@test-67B691C.irccloud.com
* test sets mode: -b+b *!*@test-67B691C.irccloud.com *!uid22341@*

Code:


## ircCloudBan v.0.4 ##

set ircSkip {
   *.irccloud.com
   192.184.9.108
   192.184.9.110
   192.184.9.112
   192.184.10.118
   192.184.10.9
   192.184.8.73
   192.184.8.10
   2001:67c:2f08*
   2001*67c*2f08*
}

bind mode - "#% +b" ircCloudBan
bind kick - * ircCloudKick

proc ircCloudBan {nk uh hn ch md banmask} {
   if {![botisop $ch]} return
   global ircSkip
   set match 0
   scan $banmask {%[^!]!%[^@]@%s} n u h
   foreach host $ircSkip {
      if {![string match -nocase $host $h]} continue
      incr match
      break
   }
   if {$match} {
      pushmode $ch -b $banmask
      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@*"
               }
            }
         }
      }
      set ::irccloudban $banmask
   }
}

proc ircCloudKick {nk uh hn ch target why} {
   if {![info exists ::irccloudban]} return
   if {![botisop $ch]} return
   set chhost [getchanhost $target $ch]
   global ircSkip
   set match 0
   if {[scan $chhost {%[^@]@%s} u h] != 2} return
   foreach host $ircSkip {
      if {![string match -nocase $host $h]} continue
      incr match
      break
   }
   if {$match} {
      if {[regexp {[su]id\d+} $u]} {
         pushmode $ch +b "*!$u@*"
      }
   }
   unset ::irccloudban
}


_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3583
Location: Mint Factory

PostPosted: Thu Feb 28, 2019 10:43 am    Post subject: Reply with quote

What's the exact user host of the test user? test-1!uid22341@test-67B691C.irccloud.com ?
_________________
I tawt I taw a puddy tat!
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 -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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