Update readme

trunk
mio 2019-01-15 17:26:21 +00:00
parent 50fb3dc5d7
commit cdc722510b
3 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ __pycache__/
nohup.out nohup.out
*/config.yml */config.yml
ramenkan/debug.log

View File

@ -5,6 +5,8 @@ A very basic Python IRC bot script.
## Example: ramenkan ## Example: ramenkan
- Install dependencies: Mastodon.py pyyaml
- Copy the `ramenkan/config.sample.yml` as `ramenkan/comfig.yml` and change - Copy the `ramenkan/config.sample.yml` as `ramenkan/comfig.yml` and change
settings. settings.

View File

@ -43,7 +43,6 @@ class IRC:
self.connect(self.server, self.bot_nick) self.connect(self.server, self.bot_nick)
self.join_channels(self.channels) self.join_channels(self.channels)
while 1: while 1:
sleep(1)
data = self.receive() data = self.receive()
self.keepalive(data, self.bot_nick) self.keepalive(data, self.bot_nick)
self.msg = self.parse(data, self.req_prefix) self.msg = self.parse(data, self.req_prefix)
@ -107,7 +106,7 @@ class IRC:
def receive(self): def receive(self):
"""Get messages from the connected socket.""" """Get messages from the connected socket."""
data = self.sock.recv(2048).decode("utf-8").strip("\r\n") data = self.sock.recv(4096).decode("utf-8").strip("\r\n")
if self.debug: if self.debug:
print("[debug][recv] " + data) print("[debug][recv] " + data)
return data return data