[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rev it up #2



Hello again, here is another patch for the infobot.  This is for
changing a nick name on the fly, as in on IRC.  Only the owner(s) of the
bot will be able to do this and it requires their password.  A simple
example would be this:
[msg(lucidx1)] <pass> nick LucidX
ωνω LucidX1 is now known as LucidX
Nothing difficult again, but just something nice to have.
#######################
            if (IsFlag("o")) { # owner/operator flag
+                if ($message =~ /^nick\s*(.*?)$/i) {
+                    if (!exists $verified{$VerifWho}) {
+                        &status("unverified <$who> $message");
+                        &msg($who, $unverified_message);
+                        return 'NOREPLY';
+                    }
+                    $nnick = $1;
+                    &rawout("NICK $nnick");
+                    &status("Changed nick to $nnick");
+                }
                if ($message =~ /^die/) {
##################
That's all for this time, hope to see some other patches out!

-Sam (CommPort5)