irc

Get highest value from a file using mSL and mIRC

你说的曾经没有我的故事 提交于 2019-12-11 02:58:56
问题 Currently I have an irc bot that when a user says a keyword e.g test1 they get +1 added to their count, which is stored in a file. However I wanted to know who had the biggest count (who was winning). I thought something like a while loop would work, looking for the numbers against the nickname, unfortunately, although my pseudo code is correct, the theoretical code, not so much. This is what I have so far. on *:TEXT:!winning:#:{ var %i = 1, %highest = 0, %mycookie = $readini(cookies.ini,n,#,

Install an ircbot that handles greetings of certain users

拟墨画扇 提交于 2019-12-11 02:45:48
问题 I want to greet a certain user ffki-besucher in a certain IRC channel. Whenever that user logs in, it should get a special message written directly into the channel. I heard weechat is a good solution, but how can I achieve this? How do I install weechat on debian wheezy? I already installed some packages: apt-get install weechat-curses weechat-plugins weechat-scripts perl I use this cool guide at https://weechat.org/files/doc/stable/weechat_quickstart.en.html Then I start weechat as user

TypeError: can't concat bytes to str, trying to use python3

旧街凉风 提交于 2019-12-10 15:49:51
问题 So the following site explains how to make an irc bot, using socket, but it only works for python2, so I tried to make it compatible, but I get the error mentioned in the title. Here is my code: import socket # Some basic variables used to configure the bot server = "irc.freenode.net" # Server channel = "#volafile" botnick = "Mybot" # Your bots nick def ping(): # This is our first function! It will respond to server Pings. ircsock.send(b"PONG :pingis\n") def sendmsg(chan , msg): # to the

socket.error: [Errno 10054]

こ雲淡風輕ζ 提交于 2019-12-10 13:50:40
问题 import socket, sys if len(sys.argv) !=3 : print "Usage: ./supabot.py <host> <port>" sys.exit(1) irc = sys.argv[1] port = int(sys.argv[2]) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.connect((irc, port)) sck.send('NICK supaBOT\r\n') sck.send('USER supaBOT supaBOT supaBOT :supaBOT Script\r\n') sck.send('JOIN #darkunderground' + '\r\n') data = '' while True: data = sck.recv(1024) if data.find('PING') != -1: sck.send('PONG ' + data.split() [1] + '\r\n') print data elif data.find('

Python, recreate a socket and automatically reconnect

寵の児 提交于 2019-12-09 12:58:10
问题 I'm writing a IRC bot in Python. Source: http://pastebin.com/gBrzMFmA ( sorry for pastebin, i don't know how to efficently/correctly use the code tagthing on here ) When the "irc" socket dies, is there anyway I could go about detecting if its dead and then automatically reconnecting? I was googling for awhile now and found that I would have to create a new socket. I was trying and added stuff like catching socket.error in the while True: but it seems to just hang and not reconnect correctly..

Gracefully shut down a TCP socket

会有一股神秘感。 提交于 2019-12-08 19:51:35
问题 I'm writing an IRC client in C++ and currently I'm having an issue where, upon exit, I do: Send("QUIT :Quit\r\n"); // just an inline, variadic send() wrapper shutdown(m_hSocket, SD_BOTH); closesocket(m_hSocket); WSAShutdown(); However, the issue is that the QUIT message is not being sent. I've sniffed the packets coming from the client and infact this message is never sent. I believe this is an issue with the socket not being flushed, but I have no idea how to do this and Google suggested

Get users list of a given channel in IRC server using C# [closed]

淺唱寂寞╮ 提交于 2019-12-08 13:36:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I use VS 2010 in Win7. I want use IRC programatically, using IRC client library in C# for Connect to an IRC server Detect if exists a channel in IRC server Get Users list of a given channel in a IRC Server. Send messages to a user in a given channel and receive messages from a user (mantenain conversation) any

Winsock - Why isn't ZNC (and IRC bouncer) accepting my winsock connection?

流过昼夜 提交于 2019-12-08 11:54:18
问题 Using a typical irc client I can type in: /server localhost 6667 nick:pass When I enter the nick:pass I configured for ZNC,(an IRC bouncer) I'm forwarded to the server that znc is connected to under my server/nick:pass combination. How can I programmatically open a winsock connection with all of these arguments simultaneously? /server localhost 6667 nick:pass I've tried sending the data after connecting but znc seems to be ignoring the requests. Or I'm just not connecting to it at all. This

send message to Thread which is listening for data from network

不打扰是莪最后的温柔 提交于 2019-12-08 10:42:42
问题 I have an Android app which has the following key components A service which manages a connection thread A connection thread which connects to IRC and listens for messages from the connection A ui which is bound the the service. I have a button on the UI and I need to send a message to the irc server when the button is clicked. My idea was to spawn a handler on the connection thread, get a handle to it in my service and then send messages from the UI to the services and from there to the

pcre expression for irc nicknames?

被刻印的时光 ゝ 提交于 2019-12-08 08:32:22
问题 Hey guys, I'm having a few issues with using PCRE to make a irc nickname format correctly. I'm not good with PCRE, and I'd love some suggestions from those of you who do use PCRE / regex. :) I'm currently using this expression: /^([^A-Za-z]{1})([^A-Za-z0-9-.]{0,32})$/ I'm using it as such: preg_replace($regex, $replaceWith, $content) I assumed this meant, starting from the front to the end, any characters that are not A-Z, a-z, or 0-9 for the first character, replace it. Any characters after