Add Database.channels.rename, as part of support for IRCv3's RENAME
This commit is contained in:
parent
7c3a8e7444
commit
055390e220
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,9 @@ class Channels(Table):
|
|||
channels WHERE server_id=? AND name=?""",
|
||||
[server_id, name.lower()])
|
||||
return value if value == None else value[0]
|
||||
def rename_channel(self, channel_id: int, new_name: str):
|
||||
self.database.execute("UPDATE channels SET name=? where channel_id=?",
|
||||
[new_name.lower(), channel_id])
|
||||
|
||||
class Users(Table):
|
||||
def add(self, server_id: int, nickname: str):
|
||||
|
|
Loading…
Reference in a new issue