mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-30 07:21:12 -05:00
Continue moving commands from Hostmask (deprecated)->SupyMisc
This commit is contained in:
parent
7a83ed7fcf
commit
c67f6bc59f
@ -56,26 +56,6 @@ class Hostmasks(callbacks.Plugin):
|
||||
irc.error('There is no such nick \'%s\'.' % nick, Raise=True)
|
||||
return splithostmask
|
||||
|
||||
def gethost(self, irc, msg, args, nick):
|
||||
"""[<nick>]
|
||||
Returns the host of <nick>. If <nick> is not given, returns the host
|
||||
of the person who called the command.
|
||||
"""
|
||||
if not nick:
|
||||
nick = msg.nick
|
||||
irc.reply(self._SplitHostmask(irc, nick)[2])
|
||||
gethost = wrap(gethost, [(additional('nick'))])
|
||||
|
||||
def getident(self, irc, msg, args, nick):
|
||||
"""[<nick>]
|
||||
Returns the ident of <nick>. If <nick> is not given, returns the host
|
||||
of the person who called the command.
|
||||
"""
|
||||
if not nick:
|
||||
nick = msg.nick
|
||||
irc.reply(self._SplitHostmask(irc, nick)[1])
|
||||
getident = wrap(getident, [(additional('nick'))])
|
||||
|
||||
def _isv4IP(self, ipstr):
|
||||
try:
|
||||
socket.inet_aton(ipstr)
|
||||
|
@ -95,8 +95,26 @@ class SupyMisc(callbacks.Plugin):
|
||||
irc.reply(irc.nick)
|
||||
botnick = wrap(botnick)
|
||||
|
||||
def getident(self, irc, msg, args, nick):
|
||||
"""[<nick>]
|
||||
Returns the ident of <nick>. If <nick> is not given, returns the host
|
||||
of the person who called the command.
|
||||
"""
|
||||
if not nick:
|
||||
nick = msg.nick
|
||||
irc.reply(ircutils.userFromHostmask(irc.state.nickToHostmask(nick)))
|
||||
getident = wrap(getident, [(additional('nick'))])
|
||||
|
||||
def gethost(self, irc, msg, args, nick):
|
||||
"""[<nick>]
|
||||
Returns the host of <nick>. If <nick> is not given, return the host
|
||||
of the person who called the command.
|
||||
"""
|
||||
if not nick:
|
||||
nick = msg.nick
|
||||
irc.reply(ircutils.hostFromHostmask(irc.state.nickToHostmask(nick)))
|
||||
gethost = wrap(gethost, [(additional('nick'))])
|
||||
|
||||
Class = SupyMisc
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||
|
Loading…
x
Reference in New Issue
Block a user