|
Joined: Apr 2005
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Apr 2005
Posts: 10 |
I need a script that can take a log of the current nicklist, then with another command, voice all the people in the log, and kick all those that are not. So lets say you have John, and Doe........Doe is in the log, but John is not, it will kick John and voice Doe. That part isnt hard to do, the trouble i'm having is getting the log to remove all the special characters (like ~, @, &, etc.) Could i get some help please?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
menu channel {
.Log Nicks: lognick $chan $me
.Voice/Kick Nicks: vknick $chan $me
.View Log: view $chan $me
}
alias lognick {
var %a = $nick($1,0)
while %a {
.write -s $+ $nick($1,%a) $chan $nick($1,%a)
dec %a
}
}
on *:text:!log:#:{
if ($nick isop $chan) {
lognick $chan $nick
}
else {
describe # Sorry $nick You don't have authorization to use that command
}
}
on *:text:!view:#:{
view $chan $nick
}
alias view {
if !$exists($1) { .msg $2 No log for $1 available }
else play $2 $1
}
on *:text:!vk:#:{
if ($nick isop $chan) {
vknick $chan $nick
}
else {
describe # Sorry $nick You don't have authorization to use that command
}
}
alias vknick {
if !$exists($1) { .msg $2 No log for $1 created }
elseif ($me !isop $1) { .msg $2 I need Ops }
else {
var %a = $nick($1,0)
while %a {
if $read($1,s,$nick($1,%a)) {
set %voice $addtok(%voice,$nick($1,%a),32)
if $numtok(%voice,32) == $modespl {
.mode $1 $+(+,$str(v,$modespl)) %voice
unset %voice
}
}
dec %a
}
if %voice {
.mode $1 $+(+,$str(v,$modespl)) %voice
unset %voice
}
var %a = $nick($1,0,r)
while %a {
kick $1 $nick($1,%a,r)
dec %a
}
}
}
This can be used by you (the person running the script) via the channel pop-up menu, or any other op using the !log or !vk commands View command(s) added. No idea why the problem you've reported is happening.
Last edited by RusselB; 22/12/05 04:31 AM.
|
|
|
|
Joined: Apr 2005
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Apr 2005
Posts: 10 |
thats basically what i wanted, but for some reason, once i do an initial log, it picks up the names, and then any !vk afterwards will get kicked. For example, i have 3 'dummys. 2 are in the channel, i log, !vk doesnt kick either of them, the third dummy joins, !vk will kick him, which is good, but when i do !log again, its adds the new name to the log, but it still kicks that third person when i type !vk, instead of voicing like it should, it kicks. and i would also like for a way to display the current log.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
|
|
|
|
|