CloudBotIRC / CloudBot

CloudBot - The simple, fast, expandable, open-source Python IRC Bot!
GNU General Public License v3.0
273 stars 252 forks source link

.seen doesn't work with some legal IRC characters #250

Open oxagast opened 7 years ago

oxagast commented 7 years ago

The command .seen also doesn't work as intended with nicks that have various characters like "`" which are legal characters for an IRC name, however, Cloudbot will always say "I can't look up that name, it is impossible to use!"

For example: .seen oxagast` Won't work.

ghost commented 7 years ago

I can't reproduce this issue, got any logs?

oxagast commented 7 years ago

Not sure what version of CloudBot JARVIS is running, but here's a log:

*** Topic for #secnews: #secnews #worldnews #secsploits #slashdot #grouphug brought to you by phar. hundreds of RSS feeds 
          in realtime. idle and read.
*** Topic set by tux [] [Mon Apr 18 12:07:45 2016]
[Users #secnews]
*** @sid            Corey84        Guest3871_    munemunk3y    r0d3nt|P_      techdarko  
*** +duhh           cstine         h3ndr1k       myrkraverk    RDNt           ThePeePs   
*** +honey0         D0gm4          handler       nawcom        redstarx       thurmyt3   
*** +rudy           davidp         HappyLoaf     nighty_       riftman        tmcaffeine 
***  agrathwohl     det            HMHackMaster  nix-7         RoboHak        tux        
***  aMunster       DrCode         ips50         NullOverflow  rootCIMv2      ubuntor    
***  astrutt        droogie        JARVIS        Nycatelos     samureye       WebDawg    
***  BaalRaElDagon  Echelon        jester`       Nyxus         schrodinger    Zed        
***  barbanegra     Ethix          KutmasteR     opticaldiff   scubacuda      zero9zero  
***  Beaches        fearghal       l0pher__      oxagast       sm0ke          zyme       
***  Bookersa       freekevin      Liothen       qthr          snide         
***  circle         Gen0           lucky225      r0d3nt        Subcomandante 
***  core           goingtoheaven  molo          r0d3nt|F      sudokek       
*** Irssi: #secnews: Total of 75 nicks [1 ops, 0 halfops, 3 voices, 71 normal]
*** Channel #secnews created Thu Jan  7 04:22:29 2016
*** Irssi: Join to #secnews was synced in 1 secs
<oxagast> .seen jester` 
<JARVIS> (oxagast) I can't look up that name, its impossible to use!
edwardslabs commented 7 years ago

This regex needs to be adjusted to include all legal IRC characters.

https://github.com/CloudBotIRC/CloudBot/blob/master/plugins/history.py#L97