Wow... thanks a bunch. This is what I have been looking for. Would it be possible to allow others to add to the list, without having to edit the script? Like !add nick ? anyways this works for me
Yeah that can be done, but you would have to make a file on the shell to add or delete nicknames and store them in it. It would be a bit more complicated as each nick would be to have an entry on a channel.
Something like: "nick:#chan" can be stored for each entry.
I am currently busy at the moment. Goodluck, hope someone else can do the rest for you, heh.
I did make a script of a similar sort recently, which utilizes the same exact database structure, but its for adding/deleting auto-voice users from a channel. Maybe you can have a look at it and try to work on it yourself:
Cool. I will take a look at it. Thanks again for your help.
Nice looking script. In fact that is how I need to add nicks to the allow list, with different levels of access. Maybe I can figure out how to replace a few things and make it work.. then again maybe not.
#Set channels you want this script to work on
set nicksnotallowed(chans) "#chan1 #chan2 #chan3"
#Set the nicks you want to allow in the channel seperated in a
#new line withing quotations marks. This is not case sensitive.
set nicksnotallowed(nicks) {
"nick1"
"nick2"
"nick3"
}
bind join - "*" nicks:not:allowed
proc nicks:not:allowed {nick uhost hand chan} {
global nicksnotallowed
if {[isbotnick $nick] || ![botisop $chan]} {return 0}
if {[lsearch -exact [split [string tolower $nicksnotallowed(chans)]] [string tolower $chan]] == -1} {return 0}
if {[lsearch -exact [split [string tolower $nicksnotallowed(nicks)]] [string tolower $nick]] == -1} {
putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putserv "KICK $chan $nick: Your nick is not allowed on this channel"
} else {
return 0
}
}
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
I've tried three different variations of the script, still the same, meaning you are using some other scripts which are counter kicking those users, because the script I coded for you is correct, no logic problem what so ever.
Remove all scripts and only use the one I gave. Then restart and then check the bot.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
ok i did that and got same thing again.. i did have other scripts but i didnt load them and did a restart. maybe i should use a fresh bot. thanks for all the help i will try on a new one tomorrow.