diff --git a/untwisted/plugins/irc.py b/untwisted/plugins/irc.py
index <HASH>..<HASH> 100644
--- a/untwisted/plugins/irc.py
+++ b/untwisted/plugins/irc.py
@@ -248,9 +248,11 @@ class Misc(object):
         spawn(spin, 'PRIVMSG->%s' % target.lower(), nick, user, host, msg)
         spawn(spin, 'PRIVMSG->%s' % nick.lower(), target, user, host, msg)
 
-        if self.nick.lower() == target.lower():
-            spawn(spin, 'PMSG', nick, target, user, host, msg)
-                
+        if target.startswith('#'):
+            spawn(spin, 'CMSG', nick, user, host, target, msg)
+        elif self.nick.lower() == target.lower():
+            spawn(spin, 'PMSG', nick, user, host, target, msg)
+        
     def on_join(self, spin, nick, user, host, chan):
         if self.nick == nick: 
             spawn(spin, 'MEJOIN', chan)
@@ -299,3 +301,7 @@ def send_cmd(server, cmd):
 
 
 
+
+
+
+
Adding irc events and fixing order of args.