]> git.donarmstrong.com Git - infobot.git/blobdiff - src/UserExtra.pl
- added support of ircTextCounters - works! thanks to #perl@OPN.
[infobot.git] / src / UserExtra.pl
index 2fd29f94b8f3664965929a1e86c266efb3e285eb..c27605ba57ff2fd6c29d76d605349cd929b17d19 100644 (file)
@@ -219,7 +219,7 @@ sub factstats {
 
 sub karma {
     my $target = lc( shift || $who );
-    my $karma  = &dbGet("karma", "nick",$target,"karma") || 0;
+    my $karma  = &dbGet("stats", "counter", "nick='$target' and type='karma'") || 0;
 
     if ($karma != 0) {
        &pSReply("$target has karma of $karma");
@@ -324,12 +324,10 @@ sub tell {
     &status("tell: target = $target, query = $query");  
 
     # "intrusive".
-    if ($target !~ /^$mask{chan}$/ and !&IsNickInAnyChan($target)) {
-       &msg($who, "No, $target is not in any of my chans.");
-       return;
-    }
-
-    ### TODO: don't "tell" if sender is not in target's channel.
+#    if ($target !~ /^$mask{chan}$/ and !&IsNickInAnyChan($target)) {
+#      &msg($who, "No, $target is not in any of my chans.");
+#      return;
+#    }
 
     # self.
     if ($target eq $ident) {   # lc?