[Tkabber-dev] r132 - trunk/plugins/autoanswer

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Sep 5 16:05:22 MSD 2008


Author: kostix
Date: 2008-09-05 16:05:21 +0400 (Fri, 05 Sep 2008)
New Revision: 132

Modified:
   trunk/plugins/autoanswer/autoanswer.tcl
Log:
autoanswer/autoanswer.tcl: Checking whether the message is sent
 from our own JID is now performed on bare JIDs (thanks to Gebb).


Modified: trunk/plugins/autoanswer/autoanswer.tcl
===================================================================
--- trunk/plugins/autoanswer/autoanswer.tcl	2008-09-01 15:30:14 UTC (rev 131)
+++ trunk/plugins/autoanswer/autoanswer.tcl	2008-09-05 12:05:21 UTC (rev 132)
@@ -126,11 +126,10 @@
 	if { [::chat::is_groupchat $chatid] } {
 		return
 	}
-	set jid [jlib::connection_jid $connid]
-	# Just to make sure the program never replies to itself
-	if { $jid == $from } {
-		return
-	}
+	# We should never reply to itself:
+	if { [string equal \
+		[node_and_server_from_jid [jlib::connection_jid $connid]]
+		[node_and_server_from_jid $from]] } return
 	# Do not reply if regexp rules are not met
 	# Do not reply to empty messages
 	if { [regexp -nocase $options(disable_regex) $from] \



More information about the Tkabber-dev mailing list