| View previous topic :: View next topic |
| Author |
Message |
outthere Voice
Joined: 26 Nov 2005 Posts: 33
|
Posted: Wed Jul 18, 2007 8:47 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Jul 18, 2007 8:56 pm Post subject: |
|
|
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:
Here is the link:
http://channels.dal.net/awyeah/scripts/voiceserv.tcl _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
outthere Voice
Joined: 26 Nov 2005 Posts: 33
|
Posted: Wed Jul 18, 2007 8:58 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
outthere Voice
Joined: 26 Nov 2005 Posts: 33
|
Posted: Wed Jul 18, 2007 9:27 pm Post subject: |
|
|
| hmm.. the bot is banning nicks in the list. |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Jul 18, 2007 10:20 pm Post subject: |
|
|
The code seems perfectly OK, not sure why that is happening. Try this:
| Code: |
#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.
================================== |
|
| Back to top |
|
 |
outthere Voice
Joined: 26 Nov 2005 Posts: 33
|
Posted: Wed Jul 18, 2007 10:29 pm Post subject: |
|
|
| still banning users in the list. dunno. |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Jul 18, 2007 10:36 pm Post subject: |
|
|
Replace these lines:
| Code: |
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
}
}
|
with these and then try:
| Code: |
if {[lsearch -exact [split [string tolower $nicksnotallowed(nicks)]] [string tolower $nick]] != -1} {return 0}
putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putserv "KICK $chan $nick: Your nick is not allowed on this channel"
return 0
}
|
_________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
outthere Voice
Joined: 26 Nov 2005 Posts: 33
|
Posted: Wed Jul 18, 2007 10:44 pm Post subject: |
|
|
| same thing.. |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Jul 18, 2007 10:50 pm Post subject: |
|
|
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.
================================== |
|
| Back to top |
|
 |
outthere Voice
Joined: 26 Nov 2005 Posts: 33
|
Posted: Wed Jul 18, 2007 11:06 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Jul 18, 2007 11:39 pm Post subject: |
|
|
*scratches* his head and wonders why.. _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
|