BarGuy wrote:... how can I change that ban type so its a ban like *@123.456.789
It depends on what you need and/or are satisfied with. If you've got it to suit you, all well and good.BarGuy wrote:got it figured out...
added
set banmask [lindex [split $uhost "@"] 1]
and changed $umask to $banmask
It will produce just the part to the right of the @ .... so its a ban like *@123.456.789 ...
Code: Select all
#
# Jan. 17, 2020
#
# http://forum.egghelp.org/viewtopic.php?t=20704
#
#
#####
bind pub - "!foo" mask_host_experiment
proc mask_host_experiment {nick uhost handle chan text} {
putserv "privmsg $chan : "
putserv "privmsg $chan :nick is: $nick - - - uhost is: $uhost "
putserv "privmsg $chan : "
set banmask [lindex [split $uhost "@"] 1]
putserv "privmsg $chan :banmask is: $banmask"
putserv "privmsg $chan : "
set another_banmask [maskhost $nick!$uhost 2]
putserv "privmsg $chan :another_banmask is: $another_banmask "
}
Actually it did exactly what we were looking for (11:05:42] * BarBot sets mode: +b *!*@89.249.65.30)However, the code you've posted won't produce what you asked for.
... so its a ban like *@123.456.789 ...
It will produce just the part to the right of the @ .
If you want a banmask like :
*!*@something.something
then there are a couple ways to achieve it.
Ok. I'm glad you're getting the ban you wanted then. Apparently the irc server does some interpreting of what is sent to it, and adds the leading *!*@ on it's own.BarGuy wrote: ...
Actually it did exactly what we were looking for (11:05:42] * BarBot sets mode: +b *!*@89.249.65.30)