irc

IRC module.

class wmflib.irc.SocketHandler(host: str, port: int, username: str)[source]

Bases: logging.Handler

Log handler to communicate with logmsgbot.

Sends log events to a tcpircbot server for relay to an IRC channel. The combination of hostname:port identifies a specific IRC channel, and for the moment only the #wikimedia-operations one is configured. Please also keep in mind that SRE allows only specific hostnames to send traffic to tcpircbot, so follow up with them in case you have doubts or special requests. For more info, please check the tcpircbot config in puppet.

Initialize the IRC socket handler.

Parameters
  • host (str) – tcpircbot hostname.

  • port (int) – tcpircbot listening port.

  • username (str) – the user to refer in the IRC messages.

class wmflib.irc.SALSocketHandler(host: str, port: int, username: str)[source]

Bases: wmflib.irc.SocketHandler

Log handler to !log on a SAL.

Initialize the IRC socket handler.

Parameters
  • host (str) – tcpircbot hostname.

  • port (int) – tcpircbot listening port.

  • username (str) – the user to refer in the IRC messages.