make a good helper for logs db func [does not make sense to move it to helpers]
This commit is contained in:
parent
817bbad971
commit
322f1b5582
|
@ -4,14 +4,8 @@
|
||||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||||
## - Nikos Kouremenos <kourem@gmail.com>
|
## - Nikos Kouremenos <kourem@gmail.com>
|
||||||
##
|
##
|
||||||
## Copyright (C) 2003-2004 Yann Le Boulanger <asterix@lagaule.org>
|
|
||||||
## Vincent Hanquez <tab@snarc.org>
|
## Copyright (C) 2005-2006 Yann Le Boulanger <asterix@lagaule.org>
|
||||||
## Copyright (C) 2005 Yann Le Boulanger <asterix@lagaule.org>
|
|
||||||
## Vincent Hanquez <tab@snarc.org>
|
|
||||||
## Nikos Kouremenos <kourem@gmail.com>
|
|
||||||
## Dimitur Kirov <dkirov@gmail.com>
|
|
||||||
## Travis Shirk <travis@pobox.com>
|
|
||||||
## Norman Rasmussen <norman@rasmussen.co.za>
|
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License as published
|
## it under the terms of the GNU General Public License as published
|
||||||
|
@ -136,7 +130,9 @@ class Logger:
|
||||||
and after that all okay'''
|
and after that all okay'''
|
||||||
|
|
||||||
possible_room_jid, possible_nick = jid.split('/', 1)
|
possible_room_jid, possible_nick = jid.split('/', 1)
|
||||||
|
return self.jid_is_room_jid(possible_room_jid)
|
||||||
|
|
||||||
|
def jid_is_room_jid(self, jid):
|
||||||
self.cur.execute('SELECT jid_id FROM jids WHERE jid=? AND type=?',
|
self.cur.execute('SELECT jid_id FROM jids WHERE jid=? AND type=?',
|
||||||
(possible_room_jid, constants.JID_ROOM_TYPE))
|
(possible_room_jid, constants.JID_ROOM_TYPE))
|
||||||
row = self.cur.fetchone()
|
row = self.cur.fetchone()
|
||||||
|
|
Loading…
Reference in New Issue