mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-06 17:44:09 +01:00
Added example.
This commit is contained in:
parent
28d81d656d
commit
906b83f1ec
@ -50,6 +50,34 @@ import ircutils
|
|||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
example = """
|
||||||
|
<jemfinch> @load Relay
|
||||||
|
<supybot> jemfinch: The operation succeeded.
|
||||||
|
<jemfinch> @startrelay freenode
|
||||||
|
<supybot> jemfinch: The operation succeeded.
|
||||||
|
<jemfinch> @relayconnect oftc irc.oftc.net
|
||||||
|
<supybot> jemfinch: The operation succeeded.
|
||||||
|
<jemfinch> @relayjoin #sourcereview
|
||||||
|
<supybot> jemfinch: The operation succeeded.
|
||||||
|
<supybot> supybot (supybot!~supybot@65.24.59.168) has joined on oftc
|
||||||
|
<jemfinch> howdy, folks :)
|
||||||
|
<supybot> jemfinch (jemfinch!~jfincher@dhcp065-024-059-168.columbus.rr.com) has joined on oftc
|
||||||
|
<jemfinch> @list Relay
|
||||||
|
<supybot> jemfinch: relaycolor, relayconnect, relaydisconnect, relayjoin, relaynames, relaypart, relaysay, relaywhois, startrelay
|
||||||
|
<jemfinch> @relaynames
|
||||||
|
<supybot> jemfinch: oftc: supybot, jemfinch, sweede, Strike, GnuVince
|
||||||
|
<jemfinch> @relaycolor 0
|
||||||
|
<supybot> jemfinch: The operation succeeded.
|
||||||
|
<jemfinch> @relaycolor 1
|
||||||
|
<supybot> jemfinch: The operation succeeded.
|
||||||
|
<jemfinch> @relaycolor 2
|
||||||
|
<supybot> jemfinch: The operation succeeded.
|
||||||
|
<jemfinch> @relaycolor 3
|
||||||
|
<supybot> jemfinch: relaycolor <0,1,2>
|
||||||
|
<jemfinch> @relaywhois GnuVince
|
||||||
|
<supybot> jemfinch: Vincent Foley (~vince@modemcable216.89-202-24.mtl.mc.videotron.ca) has been online since 08:37 PM, August 24, 2003 (idle for 1 day, 10 hours, 21 minutes, and 3 seconds) and is on #sourcereview and @#hackcanada
|
||||||
|
"""
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
import socket
|
import socket
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
@ -180,7 +208,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
"""
|
"""
|
||||||
network = privmsgs.getArgs(args)
|
network = privmsgs.getArgs(args)
|
||||||
otherIrc = self.ircs[network]
|
otherIrc = self.ircs[network]
|
||||||
otherIrc.driver.die()
|
otherIrc.die()
|
||||||
del self.ircs[network]
|
del self.ircs[network]
|
||||||
world.ircs.remove(otherIrc)
|
world.ircs.remove(otherIrc)
|
||||||
del self.abbreviations[otherIrc]
|
del self.abbreviations[otherIrc]
|
||||||
@ -226,7 +254,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
on <network>.
|
on <network>.
|
||||||
"""
|
"""
|
||||||
if not args:
|
if not args:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError, 'relaysay'
|
||||||
network = args.pop(0)
|
network = args.pop(0)
|
||||||
channel = privmsgs.getChannel(msg, args)
|
channel = privmsgs.getChannel(msg, args)
|
||||||
text = privmsgs.getArgs(args)
|
text = privmsgs.getArgs(args)
|
||||||
|
Loading…
Reference in New Issue
Block a user