Reformat with black and move console.py
This commit is contained in:
parent
bc4af153af
commit
7e1b096be5
5 changed files with 12 additions and 6 deletions
|
@ -100,7 +100,7 @@ class IRCClient:
|
||||||
self.username = None
|
self.username = None
|
||||||
self.host = None
|
self.host = None
|
||||||
self.port = None
|
self.port = None
|
||||||
#self.connect_cb = None
|
# self.connect_cb = None
|
||||||
self.timeout = None
|
self.timeout = None
|
||||||
self.blocking = None
|
self.blocking = None
|
||||||
self.ssl = None
|
self.ssl = None
|
||||||
|
@ -273,7 +273,7 @@ class IRCClient:
|
||||||
|
|
||||||
helpers.nick(self, self.nick)
|
helpers.nick(self, self.nick)
|
||||||
helpers.user(self, self.username, self.realname)
|
helpers.user(self, self.username, self.realname)
|
||||||
#if self.connect_cb:
|
# if self.connect_cb:
|
||||||
# self.connect_cb(self)
|
# self.connect_cb(self)
|
||||||
|
|
||||||
def conn(self):
|
def conn(self):
|
||||||
|
|
|
@ -115,22 +115,28 @@ def identify(cli, passwd, authuser="NickServ"):
|
||||||
def quit(cli, msg):
|
def quit(cli, msg):
|
||||||
cli.send("QUIT %s" % (msg))
|
cli.send("QUIT %s" % (msg))
|
||||||
|
|
||||||
|
|
||||||
def nick(cli, nick):
|
def nick(cli, nick):
|
||||||
cli.send(f"NICK", nick)
|
cli.send(f"NICK", nick)
|
||||||
|
|
||||||
|
|
||||||
def user(cli, username, realname):
|
def user(cli, username, realname):
|
||||||
cli.send("USER", username, "0", "*", ":" + realname)
|
cli.send("USER", username, "0", "*", ":" + realname)
|
||||||
|
|
||||||
|
|
||||||
def join(cli, channel):
|
def join(cli, channel):
|
||||||
"""Protocol potentially allows multiple channels or keys."""
|
"""Protocol potentially allows multiple channels or keys."""
|
||||||
cli.send("JOIN", channel)
|
cli.send("JOIN", channel)
|
||||||
|
|
||||||
|
|
||||||
def part(cli, channel):
|
def part(cli, channel):
|
||||||
cli.send("PART", channel)
|
cli.send("PART", channel)
|
||||||
|
|
||||||
|
|
||||||
def notice(cli, target, text):
|
def notice(cli, target, text):
|
||||||
cli.send("NOTICE", target, text)
|
cli.send("NOTICE", target, text)
|
||||||
|
|
||||||
|
|
||||||
def invite(cli, nick, channel):
|
def invite(cli, nick, channel):
|
||||||
cli.send("INVITE", nick, channel)
|
cli.send("INVITE", nick, channel)
|
||||||
|
|
||||||
|
|
|
@ -1500,7 +1500,7 @@ class PesterWindow(MovingWindow):
|
||||||
# ~ QtCore.SIGNAL('activate()'), self.console.
|
# ~ QtCore.SIGNAL('activate()'), self.console.
|
||||||
self.console.is_open = False
|
self.console.is_open = False
|
||||||
"""
|
"""
|
||||||
|
|
||||||
filemenu = self.menu.addMenu(self.theme["main/menus/client/_name"])
|
filemenu = self.menu.addMenu(self.theme["main/menus/client/_name"])
|
||||||
self.filemenu = filemenu
|
self.filemenu = filemenu
|
||||||
filemenu.addAction(opts)
|
filemenu.addAction(opts)
|
||||||
|
@ -2219,9 +2219,9 @@ class PesterWindow(MovingWindow):
|
||||||
## else:
|
## else:
|
||||||
## self.console.action.setText("Console")
|
## self.console.action.setText("Console")
|
||||||
# has_key doesn't work out here for some reason, possibly because of inherits?
|
# has_key doesn't work out here for some reason, possibly because of inherits?
|
||||||
#try:
|
# try:
|
||||||
# self.console.action.setText(self.theme["main/menus/client/console"])
|
# self.console.action.setText(self.theme["main/menus/client/console"])
|
||||||
#except:
|
# except:
|
||||||
# self.console.action.setText("Console")
|
# self.console.action.setText("Console")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -850,7 +850,7 @@ class PesterProfileDB(dict):
|
||||||
handle,
|
handle,
|
||||||
color=QtGui.QColor(c["color"]),
|
color=QtGui.QColor(c["color"]),
|
||||||
mood=Mood(c["mood"]),
|
mood=Mood(c["mood"]),
|
||||||
**options
|
**options,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue