I want to get on notice new reason i added like the first command .shun Dorian 2 . relax also and to shun multi nick like default .shun Dorian Emilia Jolee and .shun Dorian Emilia Jolee 20 . reason
in first notice msg reason is come as default reason not the reason "relax"
If someone can help thx in advance
Shun added for *@72.221.164.34 on Sat Jul 17 13:43:51 2021 GMT (from Bot to expire at Sat Jul 17 13:45:51 2021 GMT: SHUN for Dorian - Reson: relax - Time: 2 min. )
Shun added for *@72.221.164.34 on Sat Jul 17 13:43:51 2021 GMT (from Bot to expire at Sat Jul 17 13:45:51 2021 GMT: SHUN for Dorian - Reson: Abusers - Time: 2 min. )
Shun added for *@72.195.114.184 on Sat Jul 17 13:44:08 2021 GMT (from Bot to expire at Sat Jul 17 13:49:08 2021 GMT: SHUN for Emilia - Reson: Abusers - Time: 5 min. )
Shun added for *@98.162.25.7 on Sat Jul 17 13:45:21 2021 GMT (from Bot to expire at Sat Jul 17 13:48:21 2021 GMT: SHUN for Jolee - Reson: Abusers - Time: 3 min. )
bind pub -|- .shun proc_shun
proc proc_shun {nick host hand chan text} {
if {![onchan $nick #Oper ]} { return }
set nick [lindex [split $text] 0]
set reason [join [lrange [split $text "."] 1 end] "."]
set text [lindex [split $text "."] 0]
set last_el [lindex $text end]
## determine if last element is a number. If it is, use it as ban time in minutes. If it is not, then default bant time is 5 minutes.
if {[string is digit $last_el]} {
set text [lrange $text 0 end-1]
set ban_time_min $last_el
} else {
set ban_time_min 5
}
set ban_time [expr {$ban_time_min * 60}]
set nick [split [string trim $text]]
if {$reason eq ""} { set reason " SHUN for $nick - Reason: $reason - Time: $last_el min. "
} else { set reason " SHUN for $nick - Reason: Abuser -Time: $ban_time_min min. " }
set nick [split [string trim [lindex [split $text "."] 0]]]
if {[set chost [getchanhost $nick]] ne ""} {
switch -glob -- $chost {
{*.irccloud.com} - {*.mibbit.com} - {*.kiwiirc.com} {
scan $chost {%[^@]} ident
putnow "SHUN [string trimleft $ident@*] $ban_time $reason"
}
{default} {
putnow "SHUN $nick2 $ban_time $reason"
}
}
}
}
bind pub -|- .shun proc_shun
proc proc_shun {nick host hand chan text} {
if {![onchan $nick #shqiperia ]} { return }
set nick [lindex [split $text] 0]
set reason [join [lrange [split $text "."] 1 end] "."]
set text [lindex [split $text "."] 0]
set last_el [lindex $text end]
## determine if last element is a number. If it is, use it as ban time in minutes. If it is not, then default bant time is 5 minutes.
if {[string is digit $last_el]} {
set text [lrange $text 0 end-1]
set ban_time_min $last_el
} else {
set ban_time_min 5
}
set ban_time [expr {$ban_time_min * 60}]
set nick [split [string trim $text]]
if {$reason ne ""} { set reason " SHUN for $nick - Reason: $reason - Time: $last_el min. "
} else { set reason " SHUN for $nick - Reason: Abuser -Time: $ban_time_min min. " }
set nick [split [string trim [lindex [split $text "."] 0]]]
foreach user $text {
if {![onchan $user $chan]} {
putserv "NOTICE $nick $user is not on channel $chan"
} else {
if {[set chost [getchanhost $nick]] ne ""} {
switch -glob -- $chost {
{*.irccloud.com} - {*.mibbit.com} - {*.kiwiirc.com} {
scan $chost {%[^@]} ident
putnow "SHUN [string trimleft $ident@*] $ban_time $reason"
}
{default} {
putnow "SHUN $nick $ban_time $reason"
}
}
}
}
}
}
bind pub -|- .shun proc_shun
proc proc_shun {nick host hand chan text} {
if {![onchan $nick #shqiperia ]} { return }
set nick2 [lindex [split $text] 0]
set reason [join [lrange [split $text "."] 1 end] "."]
set text [lindex [split $text "."] 0]
set last_el [lindex $text end]
## determine if last element is a number. If it is, use it as ban time in minutes. If it is not, then default bant time is 5 minutes.
if {[string is digit $last_el]} {
set text [lrange $text 0 end-1]
set ban_time_min $last_el
} else {
set ban_time_min 5
}
set ban_time [expr {$ban_time_min * 60}]
set nick2 [split [string trim $text]]
if {$reason ne ""} { set reason " SHUN for $nick2 - Reason: $reason - Time: $last_el min. "
} else { set reason " SHUN for $nick2 - Reason: Abuser -Time: $ban_time_min min. " }
set nick2 [split [string trim [lindex [split $text "."] 0]]]
foreach nick2 $text {
if {![onchan $nick2 $chan]} {
putserv "NOTICE $nick $nick2 is not on channel $chan"
} else {
if {[set chost [getchanhost $nick]] ne ""} {
switch -glob -- $chost {
{*.irccloud.com} - {*.mibbit.com} - {*.kiwiirc.com} {
scan $chost {%[^@]} ident
putnow "SHUN [string trimleft $ident@*] $ban_time $reason"
}
{default} {
putnow "SHUN $nick2 $ban_time $reason"
}
}
}
}
}
}