Need small script help.. nothing major, I just can't remember

Posted by David B on Fri 27 Jun 2003 08:12 AM — 3 posts, 14,240 views.

USA #0
I have this controler script that lets me give control of my character to a fellow group member.

sub Controler (name, line, wilds)
if wilds (1) = world.getvariable ("Controler") then
world.send wilds (2)
else
world.send "gt ^B" & wilds (1)& ": ^GYou are not my Controller at the moment. Only: " & world.getvariable ("Controler") & " can Control me"
end if
end sub


The only problem with this is it also allows my controler access to certain commands I don't want them to use... I.E. global channels, The muds Configure options, and ofcourse my password(big bad juju!!) What I'd like to do is have it ignore the following commands:

config *, password *, ooc *, ic *, opray *

the trigger is: * tells the group '<my characters name> *'

For some reason I just can't remember how to do this.
USA #1
Think the easiest thing to do would have it go into a series of if-then-elseif-etc statements to check for things on the 'banned list' and then have an else which actually sends it.

By doing it individually, you can have a different message for each (a message saying 'youre not authorized to use that command' or whatnot).
Australia Forum Administrator #2
How are you giving control - with a trigger? Sounds a bit dodgy - couldn't someone fake a line with the controller's name on it? I suggest using the chat system - that lets you give control to someone who you authorise. that is much harder to fake. You could also write a plugin script to filter commands as they come in to discard ones you don't want them to do.