I've just migrated from mIRC to Xchat and I know a bit of perl so I thought I'd get going at scripting.
The thing is, I'm trying to make an opchat script (means you communicate via /notice to ops and voices).
I've accomplished the part that it sends messages to all the ops and voices, but it also shows the text event of every notice that is sent.
Eg: If there are 3 ops in the channel and I type /ov Hello (the command to send notice to all ops in the current channel), it shows like this:
->-Nick1- Hello
->-Nick2- Hello
->-Nick3- Hello
I'd rather that it display the notice something like this:
->-@#channel- Hello
Here's the code I'm using:
- Code: Select all
$text = $_[1][1];
my @userinfo = get_list("users");
if(@userinfo == $NULL){ prnt("No users in channel! o_O");}
else
{ foreach my $user (@userinfo)
{
if($user->{'prefix'} eq '@')
{
command("notice $user->{'nick'} $text");
}
}
}
I know just basic perl (not advanced stuff).
So, please help me out with this
I recall, that in mIRC you can write a '.' in front of a command and the text of that command does not show up anywhere, I want to accomplish a similar thing in my script.
There, I wrote it as detailed as I could
Please help!