@@ -144,8 +144,6 @@ def __init__(self, *args, **kwargs):
144144 def quote_set (self , nick , channel , pattern = None ):
145145 """ Insert the last matching quote from a user on a particular channel into the quotes database.
146146 """
147- user = self .identify_user (nick , channel )
148-
149147 for q in self .channel_logs [channel ]:
150148 if nick == q .nick and channel == q .channel and message_matches (q .message , pattern = pattern ):
151149 self .insert_quote (q )
@@ -329,25 +327,9 @@ def log_privmsgs(self, e):
329327
330328 channel = e ['channel' ]
331329 user = nick (e ['user' ])
332- ident = self .identify_user (user , channel )
333- ident ['message' ] = msg
334- ident ['nick' ] = user # even for auth'd user, save their nick
335330 quote = QuoteRecord (None , channel , user , msg )
336331 self .channel_logs [channel ].appendleft (quote )
337332
338- def identify_user (self , nick , channel ):
339- """Identify a user: by account if authed, if not, by nick. Produces a dict
340- suitable for throwing at mongo."""
341-
342- user = self .bot .plugins ['usertrack' ].get_user (nick )
343-
344- if user ['account' ] is not None :
345- return {'account' : user ['account' ],
346- 'channel' : channel }
347- else :
348- return {'nick' : nick ,
349- 'channel' : channel }
350-
351333def message_matches (msg , pattern = None ):
352334 """ Check whether the given message matches the given pattern
353335
0 commit comments