Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 02, 2012
EUcancER add line wrapping
as it seems to lose characters between 400 and 500 characters...
4ea18af
EUcancER Reaktor: whatweb add aggressive parameter to call 314224d
Showing with 7 additions and 5 deletions.
  1. +6 −4 Reaktor/IRC/asybot.py
  2. +1 −1  Reaktor/commands/whatweb
View
10 Reaktor/IRC/asybot.py
@@ -16,7 +16,7 @@ def is_executable(x):
from time import sleep
from sys import exit
from re import split, search
-
+from textwrap import TextWrapper
import logging,logging.handlers
log = logging.getLogger('asybot')
hdlr = logging.handlers.SysLogHandler(facility=logging.handlers.SysLogHandler.LOG_DAEMON)
@@ -39,6 +39,7 @@ def __init__(self, server, port, nickname, targets, **kwargs):
self.set_terminator('\r\n')
self.create_socket(AF_INET, SOCK_STREAM)
self.connect((self.server, self.port))
+ self.wrapper = TextWrapper(subsequent_indent=" ",width=400)
# When we don't receive data for alarm_timeout seconds then issue a
# PING every hammer_interval seconds until kill_timeout seconds have
@@ -107,9 +108,10 @@ def handle_connect(self):
def on_privmsg(self, prefix, command, params, rest):
def PRIVMSG(text):
- msg = 'PRIVMSG %s :%s' % (','.join(params), text)
- self.push(msg)
- sleep(1)
+ for line in self.wrapper.wrap(text):
+ msg = 'PRIVMSG %s :%s' % (','.join(params), line)
+ self.push(msg)
+ sleep(1)
def ME(text):
PRIVMSG('ACTION ' + text + '')
View
2  Reaktor/commands/whatweb
@@ -4,4 +4,4 @@ here=$(dirname `readlink -f $0`)
whatweb_bin="$here/../repos/whatweb/whatweb"
[ -e "$whatweb_bin" ] || ( echo "!! Whatweb app does not exist" && exit 1 )
[ "balls$1" = "balls" ] && ( echo "!! no host given" && exit 1)
-$whatweb_bin "$1"
+exec $whatweb_bin -a 3 "$1"

No commit comments for this range

Something went wrong with that request. Please try again.