
Code: Select all
bind raw - notice shun-snotice
proc shun-snotice {from keyword arg} {
 if {![string match -nocase "*shun added*" $arg]} { return }
   set shun [lrange $arg 1 end]
   putserv "privmsg #shuned :$shun"
}
bind pub o !shun pub:shun
proc pub:shun {nick host hand chan text} {
  set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
  set text [split $text]
  if {![llength $text]} { putnow "NOTICE $nick :Syntax\: !shun nick" ; return 0 }
  set target [lindex $text 0]
  if {![onchan $target $chan]} { putnow "NOTICE $nick :$target is not on $chan" ; return 0 }
  if {[isbotnick $target] || [isop $target $chan] || [ishalfop $target $chan]} { return 0 }
  if {[matchattr [nick2hand $target $chan] o|o $chan]} { return 0 }
  set tiempo [lindex $text 1]
  set reason [join [lrange $text 2 end]]
  if {$tiempo ne "" && ![regexp -nocase {^[1-9][0-9]*[dhms]$} $tiempo] && $tiempo != 0} {
    set reason [string trim "$tiempo $reason"]
    set tiempo ""
  }
  if {$tiempo eq ""} { set tiempo "1h"  }
  if {$reason eq ""} { set reason "$tiempo shun for abuse/behaviour"  }
  putquick "shun $target $tiempo $reason"
  return 0
}Code: Select all
set monchan #botop
bind raw - notice shun-snotice
proc shun-snotice {from keyword arg} {
 if {[string match -nocase "*shun*" $arg]} { 
   set shun [lrange $arg 1 end]
   putserv "privmsg $::monchan :$shun"
  }
}
bind pub -|- !shun pub:shun
proc pub:shun {nick host hand chan text} {
 if {![string equal -nocase $chan "$::monchan"]} { return 0 }
  if {![isbotnick $nick] && ![isop $nick $chan] && ![ishalfop $nick $chan] && ![matchattr [nick2hand $nick $chan] o|- $chan]} { return 0 }
  set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
  set text [split $text]
  if {![llength $text]} { putnow "NOTICE $nick :Syntax\: !shun nick" ; return 0 }
  set target [lindex $text 0]
  if {[isbotnick $target] || [isop $target $chan] || [ishalfop $target $chan]} { return 0 }
  if {[matchattr [nick2hand $target $chan] o|o $chan]} { return 0 }
  set duration [lindex $text 1]
  set reason [join [lrange $text 2 end]]
  if {$duration ne "" && ![regexp -nocase {^[1-9][0-9]$} $duration] && $duration != 0} {
    set reason [string trim "$duration $reason"]
    set duration ""
  }
  if {$duration eq ""} { set duration "3600"  }
  if {$reason eq ""} { set reason "$duration shun for abuse/behaviour"  }
  putquick "shun $target $duration :$reason"
  return 0
}
bind pub -|- !remshun pub:remove-shun
proc pub:remove-shun {nick host hand chan text} {
 if {![string equal -nocase $chan "$::monchan"]} { return 0 }
 if {![isbotnick $nick] && ![isop $nick $chan] && ![ishalfop $nick $chan] && ![matchattr [nick2hand $nick $chan] o|- $chan]} { return 0 }
  set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
  set text [split $text]
  if {![llength $text]} { putnow "NOTICE $nick :Syntax\: !shun nick" ; return 0 }
  set target [lindex $text 0]
  if {[isbotnick $target] || [isop $target $chan] || [ishalfop $target $chan]} { return 0 }
  if {[matchattr [nick2hand $target $chan] o|o $chan]} { return 0 }
  putquick "shun -$target"
  return 0
}
 works perfect but the issue confirm msg came from irc not from the script by botnet and it reveal usre's real ipsimo wrote:see if this works :
Code: Select all
<!Autobot> :tkl.TKL_ADD {[info]} Shun added: '*@x.xx.xx.xxx' {[reason:} 3600 shun for abuse/behaviour\] {[by:} Autobot!Autobot@bot.xxxxx.com\] {[duration:} 1h\]Code: Select all
<!Autobot> :tkl.TKL_DEL {[info]} Shun removed: '*@x.xx.xx.xxx' {[reason:} 3600 shun for abuse/behaviour\] {[by:} Autobot!Autobot@bot.xxxxx.com\] {[set} at: Wed Sep 27 13:19:49 2023 GMT\]output already from ircd showen in #netlog , but in #botops where we do all commands over botnet , for that i hope the confirm msg. from the shun script in #botops atleast not showen real ip if not possible to make it like:simo wrote: the reason i use the output from the IRCD is so u can see what the actuall shun that is set and also to confirm that its actually set.
Code: Select all
set monchan #botop
bind pub -|- !shun pub:shun
proc pub:shun {nick host hand chan text} {
 if {![string equal -nocase $chan "$::monchan"]} { return 0 }
 if {![isbotnick $nick] && ![isop $nick $chan] && ![ishalfop $nick $chan] && ![matchattr [nick2hand $nick $chan] o|- $chan]} { return 0 }
  set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
  set text [split $text]
 if {![llength $text]} { putnow "NOTICE $nick :Syntax\: !shun nick" ; return 0 }
  set target [lindex $text 0]
  if {[isbotnick $target] || [isop $target $chan] || [ishalfop $target $chan]} { return 0 }
  if {[matchattr [nick2hand $target $chan] o|o $chan]} { return 0 }
  set duration [lindex $text 1]
  set reason [join [lrange $text 2 end]]
  if {$duration ne "" && ![regexp -nocase {^[1-9][0-9]$} $duration] && $duration != 0} {
    set reason [string trim "$duration $reason"]
    set duration ""
  }
  if {$duration eq ""} { set duration "3600"  }
  if {$reason eq ""} { set reason "$duration shun for abuse/behaviour"  }
  putquick "privmsg $chan :Shun added on $target for $duration by $nick"
  putquick "shun $target $duration :$reason"
  return 0
}
bind pub -|- !remshun pub:remove-shun
proc pub:remove-shun {nick host hand chan text} {
 if {![string equal -nocase $chan "$::monchan"]} { return 0 }
 if {![isbotnick $nick] && ![isop $nick $chan] && ![ishalfop $nick $chan] && ![matchattr [nick2hand $nick $chan] o|- $chan]} { return 0 }
  set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
  set text [split $text]
 if {![llength $text]} { putnow "NOTICE $nick :Syntax\: !shun nick" ; return 0 }
  set target [lindex $text 0]
   putquick "privmsg $chan :Shun removed on $target by $nick"
   putquick "shun -$target"
   return 0
}
Code: Select all
<!Autobot> Shun added on Just4U for 3600 by YusifCode: Select all
<!Autobot> :tkl.TKL_ADD {[info]} Shun added: '*@x.xx.xx.xxx' {[reason:} 3600 shun for abuse/behaviour\] {[by:} Autobot!Autobot@bot.xxxxx.com\] {[duration:} 1h\]sorry simosimo wrote:im not sure i understand what you mean
Code: Select all
<!Autobot> :tkl.TKL_ADD {[info]} Shun added: '*@x.xx.xx.xxx' {[reason:} 3600 shun for abuse/behaviour\] {[by:} Autobot!Autobot@bot.xxxxx.com\] {[duration:} 1h\]Code: Select all
bind raw - notice shun-snotice
proc shun-snotice {from keyword arg} {
 if {[string match -nocase "*shun*" $arg]} {
   set shun [lrange $arg 1 end]
   putserv "privmsg $::monchan :$shun"
  }
}
g'evening simo , that part removed but msg still coming from ircdsimo wrote:remove :
Code: Select all
bind raw - notice shun-snotice proc shun-snotice {from keyword arg} { if {[string match -nocase "*shun*" $arg]} { set shun [lrange $arg 1 end] putserv "privmsg $::monchan :$shun" } }