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 

unban mibbit *!*@hostmask

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 20

PostPosted: Sun Mar 17, 2019 5:34 am    Post subject: unban mibbit *!*@hostmask Reply with quote

Hi, is someone to help with script to unban the Mibbit *!*hostmask and the ban to go in Mibbit *!ident@*

Joins : HHGG (b90d6a7e@Test-4DCCF5FD.mibbit.com)

!kb HHGG Out
!ban HHGG Out

Chanserv sets mode +b *!*@Test-4DCCF5FD.mibbit.com

need to unban this way during !kb and !ban nick

Chanserv sets mode -b+b *!*@Test-4DCCF5FD.mibbit.com *!b90d6a7e@*

Code:


## mibbitBan ##

set mibbitSkip {
   *.mibbit.com 
}

bind mode - "#% +b" mibbitBan
bind kick - * mibbitKick

proc mibbitBan {nk uh hn ch md banmask} {
   if {![botisop $ch]} return
   global mibbitSkip
   set match 0
   scan $banmask {%[^!]!%[^@]@%s} n u h
   foreach host $mibbitSkip {
      if {![string match -nocase $host $h]} continue
      incr match
      break
   }
   if {$match} {
      pushmode $ch -b $banmask 
         pushmode $ch +b "*!$user@*"
      } elseif {[regexp {id-(\d+).(.*?).mibbit.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@*"
                  utimer 300 [list putserv "MODE $chan -b $mask6"]
               }
            }
         }
      set ::mibbitban $banmask
   }
}

proc mibbitKick {nk uh hn ch target why} {
   if {![info exists ::mibbitban]} return
   if {![botisop $ch]} return
   set chhost [getchanhost $target $ch]
   global mibbitSkip
   set match 0
   if {[scan $chhost {%[^@]@%s} u h] != 2} return
   foreach host $mibbitSkip {
      if {![string match -nocase $host $h]} continue
      incr match
      break
   }
   if {$match} {
         pushmode $ch +b "*!$user@*"
         utimer 300 [list putserv "MODE $chan -b $mask6"]
      }
   unset ::mibbitban
}


_________________
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
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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