server command

This commit is contained in:
deathbybandaid 2019-07-05 08:35:33 -04:00
parent a059d2981e
commit e074d779d3
3 changed files with 26 additions and 1 deletions

View File

@ -16,13 +16,19 @@ class BotServer():
"host": botconfig.core.host,
}
self.isupport = {
"NETWORK": botconfig.core.host,
"TARGMAX": {
"KICK": 1,
'NOTICE': 1,
'PRIVMSG': 1,
},
}
self.myinfo = {}
self.myinfo = {
"servername": botconfig.core.host,
"version": None,
"usermodes": [],
"channelmodes": []
}
def rpl_welcome(self, trigger):
self.dict["host"] = str(trigger.sender).lower()

View File

@ -0,0 +1,18 @@
# coding=utf8
from __future__ import unicode_literals, absolute_import, division, print_function
"""
This is the SpiceBot Users system.
"""
import sopel
import sopel_modules.SpiceBot as SpiceBot
@SpiceBot.prerun('nickname')
@sopel.module.nickname_commands('server')
def nickname_comand_users(bot, trigger, botcom):
network = SpiceBot.server.isupport["NETWORK"]
server = SpiceBot.server.myinfo["servername"]
version = SpiceBot.server.myinfo["version"]
bot.say("I am connected to " + str(server) + " on the " + str(network) + " network. This server runs " + str(version))
return

View File

@ -9,6 +9,7 @@ This module contains references only for other modules to utilize.
from .CommandsQuery import *
from .Commands import *
from .Server import *
from .Channels import *
from .Users import *
from .Database import *