1 from pprint
import pprint
4 ADMIN_LIST
= ('User1', 'User2', 'User3')
7 """This is demo plugin, that is showing how the plugins should have beed
11 print "Give op plugin loaded."
12 self
.command
= COMMAND
13 self
.admin_list
= ADMIN_LIST
15 def __call__(self
, server
):
16 """What to do when running plugin."""
18 data
= server
.msg_data
20 # if command is COMMAND
21 # this may throw IndexError
22 if not data
['msg_list'][0] == self
.command
:
25 if not data
['prefix'].startswith(data
['user'] + r
'!i='):
27 # if user is on admin list
28 if not data
['user'] in self
.admin_list
:
31 server
.send_raw('MODE %s +o %s' % (data
['target'], data
['user']))