
miniCruzer
Novice
Aug 8, 2010, 6:39 PM
Post #1 of 9
(711 views)
|
|
Start with empty array and add to it.
|
Can't Post
|
|
I'm trying to start with an empty array, called @names and add to it as input comes in. The environment is IRC. To start, I want the client to take /NAMES and store the names in an array called @names. Then, when a user attempts a command through the bot, it checks to see if user is opped. @names should read ('\@Bot', '\@User1', 'User2') where @ in front of a name is opped. When a user is opped, it should pop(@names, "\@User2"); and unshift(@names, "User2");. However, it's going to be reading from a line like:
if ($input =~ /:(.*)!(.*) MODE (.*) \+o (.*)/) $4 will be the user.
|