Code: Select all
SlMO Sets Mode on #Test to: +b *!*@id-306017.charlton.irccloud.com
@Cappuccino Sets Mode on #Test to: -b *!*@id-306017.charlton.irccloud.com
Code: Select all
[19:08] * Joins: OnT (uid1420156@id-140156.ealing.irccloud.com)
[19:10] * user1 sets mode: +b *!*@id-140156.ealing.irccloud.com
Code: Select all
if {[regexp {\d+} $u x]} {
if {[regexp {id-(\d+).(.*?).irccloud.com} $h - y]} {
if {[string equal $x $y]} {
pushmode $ch +b "*!$u@*"
}
}
}
Code: Select all
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@*"
}
}
}
}
Code: Select all
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@*"
}
}
}
}
Code: Select all
## ircCloudBan v.1.0 ##
bind mode - "#% +b" ircCloudBan
bind kick - * ircCloudKick
proc ircCloudBan {nk uh hn ch md banmask} {
if {![botisop $ch]} return
if {[string match -nocase "*@*irccloud*" $banmask] && ![regexp {[su]id\d+} $banmask] && ![regexp {id-(\d+).(.*?).irccloud.com} $banmask] && ![string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {
set ::irccloudban $banmask
after [expr {1*1000*60}] [list unset ::irccloudban]
}
if {[regexp {[su]id\d+} $banmask] || [regexp {id-(\d+).(.*?).irccloud.com} $banmask] || [string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {
foreach n [chanlist $ch] {
if {![matchaddr $banmask $n![getchanhost $n $ch]]} { continue }
if {[isop $n $ch] || [ishalfop $n $ch]} { continue }
if {[matchattr [nick2hand $n] "fnmo|fnmo" $ch]} { continue }
set chost [getchanhost $n $ch]
regsub -all -- ~ $chost "" chost
set ident [lindex [split $chost @] 0]
set xbmaskx [string map {sid id uid id} $ident]
set bmask *!*[string tolower $xbmaskx ]@*
pushmode $ch +b $bmask
pushmode $ch -b $banmask
set ::irccloudban2 $banmask
}
}
}
proc ircCloudKick {nk uh hn ch target why} {
if {[info exists ::irccloudban] || [info exists ::irccloudban2]} {
if {![botisop $ch]} return
set chost [getchanhost $target $ch]
if {[string match -nocase "*@*irccloud*" $chost]} {
regsub -all -- ~ $chost "" chost
set ident [lindex [split $chost @] 0]
set xbmaskx [string map {sid id uid id} $ident]
set bmask *!*[string tolower $xbmaskx ]@*
pushmode $ch +b $bmask
if {[info exists ::irccloudban]} { pushmode $ch -b $::irccloudban }
after cancel unset ::irccloudban
if {[info exists ::irccloudban]} { unset ::irccloudban }
}
}
}
Code: Select all
Nick!*@*.langley.irccloud.com
Or
Nick!*@*.irccloud.com
Code: Select all
## ircCloudBan v.1.0 ##
bind mode - "#% +b" ircCloudBan
bind kick - * ircCloudKick
proc ircCloudBan {nk uh hn ch md banmask} {
if {![botisop $ch]} { return 0 }
if {[string match -nocase "*@*irccloud*" $banmask] && ![regexp {[su]id\d+} $banmask] && ![regexp {id-(\d+).(.*?).irccloud.com} $banmask] && ![string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {
set ::irccloudban $banmask
after [expr {1*1000*60}] [list unset ::irccloudban]
}
if {[regexp {[su]id\d+} $banmask] || [regexp {id-(\d+).(.*?).irccloud.com} $banmask] || [string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {
foreach n [chanlist $ch] {
if {![matchaddr $banmask $n![getchanhost $n $ch]]} { continue }
if {[isop $n $ch] || [ishalfop $n $ch]} { continue }
if {[matchattr [nick2hand $n] "fnmo|fnmo" $ch]} { continue }
set chost [getchanhost $n $ch]
regsub -all -- ~ $chost "" chost
set ident [lindex [split $chost @] 0]
set xbmaskx [string map {sid id uid id} $ident]
set bmask *!*[string tolower $xbmaskx ]@*
pushmode $ch +b $bmask
pushmode $ch -b $banmask
set ::irccloudban2 $banmask
}
}
}
proc ircCloudKick {nk uh hn ch target why} {
if {[info exists ::irccloudban] || [info exists ::irccloudban2]} {
if {![botisop $ch]} { return 0 }
set chost [getchanhost $target $ch]
if {[string match -nocase "*@*irccloud*" $chost]} {
regsub -all -- ~ $chost "" chost
set ident [lindex [split $chost @] 0]
set xbmaskx [string map {sid id uid id} $ident]
set bmask *!*[string tolower $xbmaskx ]@*
pushmode $ch +b $bmask
if {[info exists ::irccloudban]} { pushmode $ch -b $::irccloudban }
after cancel unset ::irccloudban
if {[info exists ::irccloudban]} { unset ::irccloudban }
}
}
}
Code: Select all
## ircCloudBan v.1.0 ##
bind mode - "#% +b" ircCloudBan
bind kick - * ircCloudKick
proc ircCloudBan {nk uh hn ch md banmask} {
if {![botisop $ch]} return
if {[string match -nocase "*@*irccloud*" $banmask] && ![regexp {[\`\^\-\_\\\|\}\{\[\]a-zA-Z0-9]{1,}!(\*)@.*irccloud\.com} $banmask] && ![regexp {[su]id\d+} $banmask] && ![regexp {id-(\d+).(.*?).irccloud.com} $banmask] && || ![regexp {(\*)!(\*)@.*[a-zA-Z0-9\-]+\.[a-zA-Z]+\.irccloud\.com} $banmask]} {
set ::irccloudban $banmask
after [expr {1*1000*60}] [list unset ::irccloudban]
}
if {[regexp {[\`\^\-\_\\\|\}\{\[\]a-zA-Z0-9]{1,}!(\*)@.*irccloud\.com} $banmask] || [regexp {[su]id\d+} $banmask] || [regexp {id-(\d+).(.*?).irccloud.com} $banmask] || [regexp {(\*)!(\*)@.*[a-zA-Z0-9\-]+\.[a-zA-Z]+\.irccloud\.com} $banmask]} {
set userList [chanlist $ch]
foreach n $userList {
if {![matchaddr $banmask $n![getchanhost $n $ch]]} { continue }
if {[isop $n $ch] || [ishalfop $n $ch] || [matchattr [nick2hand $n] "fnmo|fnmo" $ch]} { continue }
set chost [getchanhost $n $ch]
regsub -all -- ~ $chost "" chost
set ident [lindex [split $chost @] 0]
set xbmaskx [string map {sid id uid id} $ident]
set bmask *!*[string tolower $xbmaskx ]@*
pushmode $ch +b $bmask
pushmode $ch -b $banmask
}
}
}
proc ircCloudKick {nk uh hn ch target why} {
set chost [getchanhost $target $ch]
if {[info exists ::irccloudban] && [matchaddr $::irccloudban $target!$chost]} {
if {![botisop $ch]} return
regsub -all -- ~ $chost "" chost
set ident [lindex [split $chost @] 0]
set xbmaskx [string map {sid id uid id} $ident]
set bmask *!*[string tolower $xbmaskx ]@*
pushmode $ch +b $bmask
pushmode $ch -b $::irccloudban
after cancel unset ::irccloudban
unset ::irccloudban
}
}
putlog "irccloud.tcl Loaded."