Client¶
-
class
irctk.client.Client(nickname: str = 'irctk', ident: str = 'irctk', realname: str = 'irctk', password: str = None)¶ >>> client = Client(nickname='example')
-
channel_class¶ alias of
irctk.channel.Channel
-
connect(host: str, port: int, use_tls: bool = False, loop=None)¶ Connect to the IRC server
-
irc_equal(lhs: str, rhs: str) → bool¶ Determine if two strings are IRC equal.
-
quit(message: str = 'Disconnected')¶ Disconnects from IRC and closes the connection. Accepts an optional reason.
-
send(message_or_command, *parameters, colon: bool = False)¶ Send an IRC message
>>> client.send('JOIN', '#example')
-
send_join(channel, key: str = None)¶ Sends a JOIN channel command.
>>> client.send_join('#palaver')
-
send_line(line: str)¶ Sends a raw line to IRC
Example:
>>> client.send_line('PRIVMSG kylef :Hey!')
-
send_part(channel)¶ Sends a PART channel command.
>>> client.send_part('#palaver')
-
send_privmsg(target, message: str)¶ Sends a private message to a target.
Example:
>>> client.send_privmsg('kyle', 'Hi') >>> client.send_privmsg(channel, 'Hi')
-