Old stuff/Perl/droyer_irc/fcts/Admin_add
(Deskargatu)
A
\!Admin add ([^\s]*)
$ajout = $1;
if ($fullpower !~ / $ajout /)
{
$chan =~ s/\#//g;
$fullpower = $fullpower.$ajout." ";
print "PRIVMSG $debug :Anadido $1 en el control del bot .\n";
open(CONF_OPEN,"config");
my @temp_nick = <CONF_OPEN>;
close CONF_OPEN;
open(CONF_WRITE,">config");
foreach(@temp_nick)
{
if (/^\$chan_$chan/) { print "PRIVMSG \#$chan :AJOUT en cours ..\n"; print CONF_WRITE "\$chan_$chan=\"$fullpower \";\n"; $aajout=1;}
else { print CONF_WRITE "$_"; }
}
if (!$aajout)
{ print "PRIVMSG \#$chan :AJOUT en cours ..\n"; print CONF_WRITE "\$chan_$chan=\"$fullpower \";\n"; }
close CONF_WRITE;
}
else
{
print "PRIVMSG $debug :$ajout ya es Admin\n";
}