tcpac del url is shared privately
This commit is contained in:
parent
43c87f51b8
commit
08c8b5b835
|
@ -1,18 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*- ############################################################################# SOF
|
||||
from irc3.plugins.command import command
|
||||
from irc3.plugins.cron import cron
|
||||
import irc3
|
||||
import socket
|
||||
|
||||
#########################################################################################################
|
||||
@irc3.plugin
|
||||
class Plugin:
|
||||
|
||||
#########################################################################################################
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
#####################################################################################################
|
||||
@command(permission='view')
|
||||
def tcpac(self, mask, target, args):
|
||||
"""tcpac
|
||||
"""tcpac - the irc version of `cat file - | nc tcp.ac 9999`, usage: ?tcpac message
|
||||
%%tcpac <message>...
|
||||
"""
|
||||
msg=' '.join(args['<message>'])
|
||||
|
@ -22,7 +22,11 @@ class Plugin:
|
|||
data = s.recv(1024)
|
||||
response=f'{data!r}'
|
||||
response=response.replace('\\n',' - ').replace("b'","")[:-1]
|
||||
msg=f"{mask.nick}: {response.split()[0]}"
|
||||
delmsg=s.split(',')[0].split('":"')[1][:-1]
|
||||
txtmsg=s.split(',')[1].split('":"')[1][:-2]
|
||||
msg=f"{mask.nick}: tcp.ac service - url to share -> txt: {txtmsg}"
|
||||
self.bot.privmsg(target,msg)
|
||||
msg=f"{response}"
|
||||
msg=f"{mask.nick}: tcp.ac service - url to admin -> del: {delmsg}"
|
||||
self.bot.privmsg(mask.nick,msg)
|
||||
#####################################################################################################
|
||||
##################################################################################################### EOF
|
||||
|
|
Loading…
Reference in New Issue