25 lines
818 B
Python
25 lines
818 B
Python
|
from pinhook import plugin as p
|
||
|
|
||
|
@p.command('&echo', ops=True, help_text='Replies the current message to the current channel/user')
|
||
|
def echo(msg):
|
||
|
if msg.nick in msg.ops:
|
||
|
return p.message(msg.arg)
|
||
|
|
||
|
@p.command('&ech', ops=True, help_text='Sends a message to a channel you specify')
|
||
|
def echo(msg):
|
||
|
if msg.nick in msg.ops:
|
||
|
arg = msg.arg.split(' ')
|
||
|
chan = arg[0]
|
||
|
mesg = ' '.join(arg[1:])
|
||
|
msg.privmsg(chan, mesg)
|
||
|
return p.message(f'"{mesg}" sent to {chan}')
|
||
|
|
||
|
@p.command('&nech', ops=True, help_text='Sends a notice to a channel you specify')
|
||
|
def notice(msg):
|
||
|
if msg.nick in msg.ops:
|
||
|
arg = msg.arg.split(' ')
|
||
|
chan = arg[0]
|
||
|
mesg = ' '.join(arg[1:])
|
||
|
msg.notice(chan, mesg)
|
||
|
return p.message(f'notice: "{mesg}" sent to {chan}')
|