mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 15:44:06 +01:00
Added module docstring and removed nslookup/host as aliases for dns
This commit is contained in:
parent
8bafe4ee12
commit
54e0c07a9c
@ -29,6 +29,13 @@
|
|||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
###
|
###
|
||||||
|
|
||||||
|
"""
|
||||||
|
Provides fun/useless commands that require threads.
|
||||||
|
|
||||||
|
Commands include:
|
||||||
|
dns
|
||||||
|
"""
|
||||||
|
|
||||||
from baseplugin import *
|
from baseplugin import *
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
@ -39,7 +46,7 @@ import callbacks
|
|||||||
|
|
||||||
class ThreadedFunCommands(callbacks.Privmsg):
|
class ThreadedFunCommands(callbacks.Privmsg):
|
||||||
threaded = True
|
threaded = True
|
||||||
def nslookup(self, irc, msg, args):
|
def dns(self, irc, msg, args):
|
||||||
"<host|ip>"
|
"<host|ip>"
|
||||||
host = privmsgs.getArgs(args)
|
host = privmsgs.getArgs(args)
|
||||||
if ircutils.isIP(host):
|
if ircutils.isIP(host):
|
||||||
@ -55,9 +62,6 @@ class ThreadedFunCommands(callbacks.Privmsg):
|
|||||||
except socket.error:
|
except socket.error:
|
||||||
irc.error(msg, 'Host not found.')
|
irc.error(msg, 'Host not found.')
|
||||||
|
|
||||||
host = nslookup
|
|
||||||
dns = nslookup
|
|
||||||
|
|
||||||
|
|
||||||
Class = ThreadedFunCommands
|
Class = ThreadedFunCommands
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user