From 3db33a040edb43abb6479732a1fee5071861c5f9 Mon Sep 17 00:00:00 2001 From: "ian%hixie.ch" Date: Sun, 29 Apr 2001 08:35:29 +0000 Subject: [PATCH] Fixing various typos and spelling mistakes spotted by timeless. There shouldn't be any code level changes here. moa=hixie --- webtools/mozbot/BotModules/COPYING | 4 ++-- webtools/mozbot/BotModules/FortuneCookies.bm | 5 +++-- webtools/mozbot/BotModules/God.bm | 2 +- webtools/mozbot/BotModules/Greeting.bm | 2 +- webtools/mozbot/BotModules/Wishlist.bm | 2 +- webtools/mozbot/BotModules/devel.txt | 6 +++--- webtools/mozbot/INSTALL | 9 ++++++--- webtools/mozbot/lib/Mails.pm | 2 +- webtools/mozbot/mozbot.pl | 17 +++++++++-------- 9 files changed, 27 insertions(+), 22 deletions(-) diff --git a/webtools/mozbot/BotModules/COPYING b/webtools/mozbot/BotModules/COPYING index ebe285e28df..00abfdca6ce 100644 --- a/webtools/mozbot/BotModules/COPYING +++ b/webtools/mozbot/BotModules/COPYING @@ -18,5 +18,5 @@ Reserved. Contributor(s): Harrison Page Terry Weissman Risto Kotalampi - Josh Soref - Ian Hickson + Josh Soref + Ian Hickson diff --git a/webtools/mozbot/BotModules/FortuneCookies.bm b/webtools/mozbot/BotModules/FortuneCookies.bm index cd0e756f06a..39b7020e242 100644 --- a/webtools/mozbot/BotModules/FortuneCookies.bm +++ b/webtools/mozbot/BotModules/FortuneCookies.bm @@ -13,8 +13,9 @@ sub Help { return { '' => 'A module to get random fortune cookies.', 'fortune' => 'Same as \'cookie\', which see.', - 'cookie' => 'To get a fortune cookie, just tell me \'cookie\'. To set a new fortune cookie, see \'new\'. To find out how many cookies are left, use \'cookie status\'.', + 'cookie' => 'To get a fortune cookie, just tell me \'cookie\'. To set a new fortune cookie, see \'new\' (or \'add\'). To find out how many cookies are left, use \'cookie status\'.', 'new' => 'To set a new fortune cookie, say \'new cookie\' followed by the text, e.g. \'new cookie: you will have a nice day\' or whatever. The string %from% will be replaced by the name of whoever requests the cookie.', + 'add' => 'To add a new fortune cookie, say \'add cookie\' followed by the text, e.g. \'add cookie: you will have a nice day\' or whatever. The string %from% will be replaced by the name of whoever requests the cookie.', 'fetch' => 'The command \'fetch cookies from \' will add each line in to the cookie list. Cookie lists must start with one line that reads \'FORTUNE COOKIE FILE\'. Blank lines and lines starting with a hash (\'#\') are ignored.', }; } @@ -56,7 +57,7 @@ sub Told { } else { $self->say($event, 'I\'m sorry, I\'ve run out of cookies! You\'ll have to wait for me to bake some more.'); } - } elsif ($message =~ /^\s*new\s+(?:fortune\s+cookie|fortune|cookie)[-!:,;.\s]+(.....+?)\s*$/osi) { + } elsif ($message =~ /^\s*(?:new|add)\s+(?:fortune\s+cookie|fortune|cookie)[-!:,;.\s]+(.....+?)\s*$/osi) { push(@{$self->{'cookies'}}, $1); my $count = scalar(@{$self->{'cookies'}}); $self->say($event, "$event->{'from'}: Thanks! I have added that fortune cookie to my recipe book. I now have $count fortunes!"); diff --git a/webtools/mozbot/BotModules/God.bm b/webtools/mozbot/BotModules/God.bm index e1002ba8dad..c9bba53f09f 100644 --- a/webtools/mozbot/BotModules/God.bm +++ b/webtools/mozbot/BotModules/God.bm @@ -16,7 +16,7 @@ sub Help { 'opme' => 'Checks the autoop list, and ops the speaker if they are on the autoop list. Must be used in a channel. Syntax: \'op me\' or \'opme\'', 'mask' => 'Add or remove a regexp mask from a channel\'s autoop list. Only bot and channel admins can do this. USE OF THIS FEATURE IS HIGHLY DISCOURAGED AS IT IS VERY INSECURE!!! Syntax: \'add mask in \' to add and \'remove mask in \' to remove. The special word \'everywhere\' can be used instead of a channel name to add a mask that works in all channels.', 'autoop' => 'Add someone to the autoop list for a channel. Only bot and channel admins can do this. Syntax: \'op in \'', - 'deautoop' => 'Remove someone from the autoop list for a channel. Only bot and channel admins can do this. Syntax: \'deop in \'', + 'deautoop' => 'Remove someone from the autoop list for a channel. Only bot and channel admins can do this. Syntax: \'deautoop in \'', 'enable' => 'Enable a module in a channel. Only bot and channel admins can do this. Syntax: \'enable in \'', 'disable' => 'Disable a module in a channel. Only bot and channel admins can do this. Syntax: \'disable in \'', }; diff --git a/webtools/mozbot/BotModules/Greeting.bm b/webtools/mozbot/BotModules/Greeting.bm index d7206b79060..ae0fcf9d26a 100644 --- a/webtools/mozbot/BotModules/Greeting.bm +++ b/webtools/mozbot/BotModules/Greeting.bm @@ -17,7 +17,7 @@ sub Help { return { '' => 'A polite module for saying hello and goodbye and so on.', 'hi' => 'To greet the bot.', - 'bye' => 'To say good bye to the bot.', + 'bye' => 'To say goodbye to the bot.', 'ping' => 'To check the bot is alive.', 'uptime' => 'Gives the amount of time that the bot has been active.', }; diff --git a/webtools/mozbot/BotModules/Wishlist.bm b/webtools/mozbot/BotModules/Wishlist.bm index f39bb74afcb..4fd67db0feb 100644 --- a/webtools/mozbot/BotModules/Wishlist.bm +++ b/webtools/mozbot/BotModules/Wishlist.bm @@ -45,7 +45,7 @@ sub Told { } $self->directSay($event, 'End of wishes.'); } else { - $self->directSay($event, 'Noone has wished for anything!'); + $self->directSay($event, 'No-one has wished for anything!'); } $self->channelSay($event, "$event->{'from'}: wishlist /msg'ed"); } else { diff --git a/webtools/mozbot/BotModules/devel.txt b/webtools/mozbot/BotModules/devel.txt index bf1f0761ad4..61341ca3671 100644 --- a/webtools/mozbot/BotModules/devel.txt +++ b/webtools/mozbot/BotModules/devel.txt @@ -197,7 +197,7 @@ set to 1. This won't be a problem if your module only returns 1 *** PartedChannel($event, $channel) Called after the bot has left a channel, for example if the bot has - been /hicked. + been /kicked. No special return values. Always call inherited the function, as this is where the autopart function is implemented. @@ -543,7 +543,7 @@ recommended. Example: $self->registerVariables( [ 'ftpDelay', 1, 1, 60 ], - [ 'ftpsite', 1, 1, 'ftp.mozilla.org' ], + [ 'ftpSite', 1, 1, 'ftp.mozilla.org' ], ); @@ -700,7 +700,7 @@ recommended. Set the bot's 'away' flag. A blank message will mark the bot as back. Note: If you need this you are doing something wrong!!! Remember that you should not be doing any lengthy processes since if - you are away for any length of time, the bot will be kicked! + you are away for any length of time, the bot will be disconnected! Also note that in 2.0 this is not throttled, so DO NOT call this repeatedly, or put yourself in any position where you allow IRC diff --git a/webtools/mozbot/INSTALL b/webtools/mozbot/INSTALL index bc4a8b7cd24..ddfbfb5649b 100644 --- a/webtools/mozbot/INSTALL +++ b/webtools/mozbot/INSTALL @@ -74,7 +74,11 @@ See the "Administration" section for instructions on how to change the administration password (important!). Note: Passwords are printed in clear text on the console and in the -log files. Secure them accordingly. +log files. Secure them accordingly. Of course, IRC is an inherently +insecure protocol anyway, and any machine between your IRC client's +and your bot's, going through the IRC network's servers, will have +access to the passwords. For this reason, change them often, and don't +use passwords that you use for important things here. The default setting is for mozbot to run with taint checking enabled. I *STRONGLY* recommend not changing this. @@ -189,7 +193,6 @@ Now authenticate yourself again, as the new user: The moment you authenticate as the new admin, the default admin account is deleted. - You are now in a position to add the modules you want and to put the bot in the channels you want it in. @@ -214,7 +217,7 @@ the following message: /msg mozbot shutup please It should respond within a few seconds. You can authenticate while it -is speaking, that is no problem. +is speaking, that's not a problem. VARIABLES diff --git a/webtools/mozbot/lib/Mails.pm b/webtools/mozbot/lib/Mails.pm index 06d2dc1627e..5827b4881c4 100644 --- a/webtools/mozbot/lib/Mails.pm +++ b/webtools/mozbot/lib/Mails.pm @@ -19,7 +19,7 @@ # # Contributor(s): Harrison Page # Terry Weissman -# Ian Hickson +# Ian Hickson package Mails; use strict; diff --git a/webtools/mozbot/mozbot.pl b/webtools/mozbot/mozbot.pl index fe0f72ab02d..05240db455d 100755 --- a/webtools/mozbot/mozbot.pl +++ b/webtools/mozbot/mozbot.pl @@ -130,11 +130,11 @@ $|++; # internal 'constants' my $NAME = 'mozbot'; -my $VERSION = q$Revision: 2.0 $; +my $VERSION = q$Revision: 2.1 $; my $USERNAME = "pid-$$"; my $LOGFILEPREFIX; -# adjust the version constants +# adjust the version constant $VERSION =~ /([0-9.]+)/; $VERSION = $1; @@ -1448,7 +1448,7 @@ sub getModule { } # tellAdmin - may try to talk to an admin. -# NO GUARENTEES! This will PROBABLY NOT reach anyone! +# NO GUARANTEES! This will PROBABLY NOT reach anyone! sub tellAdmin { my $self = shift; my ($event, $data) = @_; @@ -1965,7 +1965,7 @@ sub Set { } elsif (ref($self->{$variable}) eq 'HASH') { if ($value =~ /^\+(.)(.*)\1(.*)$/so) { $self->{$variable}->{$2} = $3; - return -2 if $1 =~ /[a-zA-Z]/os; + return -2 if $1 =~ /[a-zA-Z]/so; } elsif ($value =~ /^\-(.*)$/so) { # XXX no feedback if nothing is done delete($self->{$variable}->{$1}); @@ -2101,8 +2101,8 @@ sub Help { 'restart' => 'Shuts the bot down completely then restarts it, so that any source changes take effect.', 'cycle' => 'Makes the bot disconnect from the server then try to reconnect.', 'vars' => 'Manage variables: vars [ [ [\'\']]], say \'vars\' for more details.', - 'join' => 'Makes the bot attempt to join a channel. You can also use /invite. Syntax: join ', - 'part' => 'Makes the leave a channel. The same affect can be achieved using /kick. Syntax: part ', + 'join' => 'Makes the bot attempt to join a channel. The same effect can be achieved using /invite. Syntax: join ', + 'part' => 'Makes the bot leave a channel. The same effect can be achieved using /kick. Syntax: part ', 'load' => 'Loads a module from disk, if it is not already loaded: load ', 'unload' => 'Unloads a module from memory: load ', 'reload' => 'Unloads and then loads a module: reload ', @@ -2370,7 +2370,7 @@ sub Invited { # on the server should the bot join first. my $channel = lc($channelName); if (grep($_ eq $channel, @channels)) { - $self->directSay($event, "I think already *in* channel $channel! If this is not the case please make me part and then rejoin."); + $self->directSay($event, "I think I'm already *in* channel $channel! If this is not the case please make me part and then rejoin."); } else { if ($self->isAdmin($event) || $self->{'allowInviting'}) { $self->debug("Joining $channel, since I was invited."); @@ -2561,7 +2561,7 @@ sub Told { } else { $self->directSay($event, "Help topics for $NAME $VERSION ($helpline):"); $self->say($event, "$event->{'from'}: help info /msg'ed") if ($event->{'channel'}); - local @" = ', '; + local @" = ', '; # to reset font-lock: " my @helplist; foreach my $module (@modules) { my %commands = %{$module->Help($event)}; @@ -2653,6 +2653,7 @@ sub SpottedQuit { my $self = shift; my ($event, $who, $why) = @_; delete($authenticatedUsers{$event->{'user'}}); + # XXX this doesn't deal with a user who has authenticated twice. return $self->SUPER::SpottedQuit(@_); }