2015-01-13 12:28:05 +00:00
|
|
|
#!/bin/python
|
|
|
|
#
|
|
|
|
# Cryptonote tipbot - network
|
|
|
|
# Copyright 2015 moneromooo
|
|
|
|
#
|
|
|
|
# The Cryptonote tipbot is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License as published
|
|
|
|
# by the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
# any later version.
|
|
|
|
#
|
|
|
|
|
|
|
|
from link import Link
|
|
|
|
from user import User
|
|
|
|
from group import Group
|
|
|
|
|
|
|
|
class Network:
|
|
|
|
def __init__(self,name):
|
|
|
|
self.name=name
|
|
|
|
|
|
|
|
def connect(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def disconnect(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def send_group(self,group,msg,data=None):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def send_user(self,user,msg,data=None):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def identify(self,link):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def dump_users(self):
|
|
|
|
pass
|
|
|
|
|
2015-03-20 18:07:53 +00:00
|
|
|
def set_callbacks(self,on_command,on_identified,on_event):
|
2015-01-13 12:28:05 +00:00
|
|
|
self.on_command=on_command
|
|
|
|
self.on_identified=on_identified
|
2015-03-20 18:07:53 +00:00
|
|
|
self.on_event=on_event
|
2015-01-13 12:28:05 +00:00
|
|
|
|
2015-02-05 21:41:18 +00:00
|
|
|
def get_last_active_time(self,user_name,group_name=None):
|
2015-01-13 12:28:05 +00:00
|
|
|
return None
|
|
|
|
|
2015-02-05 21:41:18 +00:00
|
|
|
def get_active_users(self,seconds,group_name=None):
|
2015-01-13 12:28:05 +00:00
|
|
|
return []
|
|
|
|
|
2015-02-05 21:41:18 +00:00
|
|
|
def get_users(self,group_name=None):
|
2015-01-13 12:28:05 +00:00
|
|
|
return []
|
|
|
|
|
|
|
|
def update_users_list(self,group_name=None):
|
|
|
|
pass
|
|
|
|
|
2015-01-30 18:13:52 +00:00
|
|
|
def canonicalize(self,name):
|
|
|
|
return name
|
|
|
|
|
2015-01-13 12:28:05 +00:00
|
|
|
def update(self):
|
|
|
|
return True
|
|
|
|
|
|
|
|
def quit(self,msg=None):
|
|
|
|
pass
|