From 6907da0a5da3d45a91c3ac4893e5b890200b27eb Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Thu, 28 Jun 2007 23:48:48 +0000 Subject: modularized stuff, fixed alert logic, simplified stuff, updated TODO --- config-default/commands.xml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'config-default') diff --git a/config-default/commands.xml b/config-default/commands.xml index b86783e..7eaca57 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -3,7 +3,7 @@ query($channel, $nuh[0], $nuh[2], $nuh[4]); $conn->privmsg($event->{to}->[0], "$result results found."); ]]> @@ -12,8 +12,7 @@ my $nick = lc $1; my $host = $2; if ($host eq '') { $host = 'IDENTIFY'; } - $::xusers->{$nick} = { 'host' => $host }; - $::users->{person} = $::xusers; + $::users->{person}->{$nick} = { 'host' => $host }; writeUsers(); $conn->privmsg($event->{to}->[0], "Hiya $nick"); ]]> @@ -22,10 +21,9 @@ {$nick}->{flags}); } else { - $::xusers->{$nick}->{flags} = $flags; + if ($flags eq '') { delete($::users->{person}->{$nick}->{flags}); } else { + $::users->{person}->{$nick}->{flags} = $flags; } - $::users->{person} = $::xusers; writeUsers(); $conn->privmsg($event->{to}->[0], "Flags for $nick set to $flags"); ]]> @@ -33,8 +31,7 @@ {$nick}); - $::users->{person} = $::xusers; + delete($::users->{person}->{$nick}); writeUsers(); $conn->privmsg($event->{to}->[0], "Byebye $nick"); ]]> @@ -42,8 +39,8 @@ {$nick}->{flags})) { - $conn->privmsg($event->{to}->[0], "Flags for $nick: $::xusers->{$nick}->{flags}"); + if (defined($::users->{person}->{$nick}->{flags})) { + $conn->privmsg($event->{to}->[0], "Flags for $nick: $::users->{person}->{$nick}->{flags}"); } else { $conn->privmsg($event->{to}->[0], "$nick has no flags"); } -- cgit v1.2.3