forked from renefritze/relayhost
-
Notifications
You must be signed in to change notification settings - Fork 3
/
systemlog.py
27 lines (23 loc) · 917 Bytes
/
systemlog.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- coding: utf-8 -*-
import time
import datetime
import os
import sys
from tasbot.customlog import Log
from tasbot.plugin import IPlugin
class Main(IPlugin):
def __init__(self,name,tasclient):
IPlugin.__init__(self,name,tasclient)
def onload(self,tasc):
pass
def oncommandfromserver(self,command,args,socket):
if command == "SAID" and args[0] == "autohost":
self.logger.debug("<%s> %s" % ( args[1] , " ".join(args[2:])))
if command == "SAIDEX" and args[0] == "autohost":
self.logger.debug("* %s %s" % ( args[1] , " ".join(args[2:])))
if command == "JOINED" and args[0] == "autohost":
self.logger.info("** %s has joined the channel\n" % (args[1]))
if command == "LEFT" and args[0] == "autohost":
self.logger.info("** %s has left the channel ( %s )\n" % ( args[1] , " ".join(args[2:])))
def onloggedin(self,socket):
self.logger.info("********** CONNECTED ***********\n")