mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 06:29:54 -05:00
server command
This commit is contained in:
parent
a059d2981e
commit
e074d779d3
@ -16,13 +16,19 @@ class BotServer():
|
|||||||
"host": botconfig.core.host,
|
"host": botconfig.core.host,
|
||||||
}
|
}
|
||||||
self.isupport = {
|
self.isupport = {
|
||||||
|
"NETWORK": botconfig.core.host,
|
||||||
"TARGMAX": {
|
"TARGMAX": {
|
||||||
"KICK": 1,
|
"KICK": 1,
|
||||||
'NOTICE': 1,
|
'NOTICE': 1,
|
||||||
'PRIVMSG': 1,
|
'PRIVMSG': 1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
self.myinfo = {}
|
self.myinfo = {
|
||||||
|
"servername": botconfig.core.host,
|
||||||
|
"version": None,
|
||||||
|
"usermodes": [],
|
||||||
|
"channelmodes": []
|
||||||
|
}
|
||||||
|
|
||||||
def rpl_welcome(self, trigger):
|
def rpl_welcome(self, trigger):
|
||||||
self.dict["host"] = str(trigger.sender).lower()
|
self.dict["host"] = str(trigger.sender).lower()
|
||||||
|
|||||||
18
sopel_modules/SpiceBot_Core_Commands/Server.py
Normal file
18
sopel_modules/SpiceBot_Core_Commands/Server.py
Normal 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
|
||||||
@ -9,6 +9,7 @@ This module contains references only for other modules to utilize.
|
|||||||
|
|
||||||
from .CommandsQuery import *
|
from .CommandsQuery import *
|
||||||
from .Commands import *
|
from .Commands import *
|
||||||
|
from .Server import *
|
||||||
from .Channels import *
|
from .Channels import *
|
||||||
from .Users import *
|
from .Users import *
|
||||||
from .Database import *
|
from .Database import *
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user