changeset 31:ba7303a5f42d

Added \!update command
author df
date Sun, 07 Dec 2008 08:47:25 +0000
parents c25d5c1e7f28
children 276658826bc0
files skillbot.pl
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/skillbot.pl	Sat Dec 06 23:56:28 2008 +0000
+++ b/skillbot.pl	Sun Dec 07 08:47:25 2008 +0000
@@ -225,6 +225,7 @@
 	my ($self, $event) = @_;
 	my ($their_nick, $msg) = ($event->nick, $event->args);
 
+	# lists the current chars in training of the caller
 	if ($msg =~ /^\!eta(\s+(.+))?/i) {
 		my $found = 0;
 		for my $f (@friends) {
@@ -248,6 +249,14 @@
 			$self->privmsg('#' . $config{channel}, "No characters found");
 		}
 	}
+	
+	# force update/reload of the friends/training data
+	if ($msg =~ /^\!update/i) {
+		update_friends($self);
+		check_training($self);
+		$self->privmsg('#' . $config{channel}, "Done");
+	}
+
 }
 
 sub on_notice