irc

Embed mIRC Color codes into a C# literal?

和自甴很熟 提交于 2019-12-03 09:24:43
问题 I'm working on a simple irc bot in C#, and I can't figure out how to embed the typical mirc control codes for bold/color etc into string literals. Can someone point me towards how to do this? 回答1: The mIRC color code format is described here. I guess you're asking how to embed a ^C in a string. This is known as Caret notation. According to C0 and C1 control codes, ^C is: '\x03' Embedded in a string: "blabla \x035,12to be colored text and background\x03 blabla" 回答2: I create an enum and assign

Python - a bytes like object is required, not str

半腔热情 提交于 2019-12-03 08:08:54
问题 I'm moving my Twitch bot from Python 2.7 to Python 3.5. I keep getting the error: a bytes like object is required not 'str' on the 2nd line of the code below. twitchdata = irc.recv(1204) data = twitchdata.split(":")[1] twitchuser = data.split("!")[0] twitchmsg = twitchdata.split(":")[2] chat = str(twitchuser) +": "+ str(twitchmsg) print(chat) #prints chat to console 回答1: try data = twitchdata.decode().split(":")[1] instead of data = twitchdata.split(":")[1] 来源: https://stackoverflow.com

Python : Check if IRC connection is lost (PING PONG?)

╄→гoц情女王★ 提交于 2019-12-03 06:06:58
问题 So my question is, how would i get my bot to listen if there is a PING and if there's no ping in an interval of a minute, it will react as though the connection has been lost. How would one go about doing that? EDIT: This is the working code for registering the connection fallout (although having trouble with reconnecting): #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import socket import string import os import platform import time # Variables HOST = "irc.channel.net" PORT = 6667

IRC channel for iPhone developers? [closed]

柔情痞子 提交于 2019-12-03 01:21:34
I was wondering if there is a good IRC channel around somewhere that allows iPhone developers to get together and talk about code and etc. Any channel already around that people are using? It's #iphonedev on irc.freenode.net. Without the dash. There's also #cocoa-init. It's a new channel focused on asking and answering questions for beginning developers on iOS/OSX. the people on #iphonedev are not very friendly. I've found the various iphone channels on irc.osx86.hu to be helpful. wisequark #iphonedev on irc.freenode.net EBGreen As far as I know, the NDA that Apple forces iPhone developers to

Embed mIRC Color codes into a C# literal?

旧巷老猫 提交于 2019-12-02 23:48:44
I'm working on a simple irc bot in C#, and I can't figure out how to embed the typical mirc control codes for bold/color etc into string literals. Can someone point me towards how to do this? The mIRC color code format is described here . I guess you're asking how to embed a ^C in a string. This is known as Caret notation . According to C0 and C1 control codes , ^C is: '\x03' Embedded in a string: "blabla \x035,12to be colored text and background\x03 blabla" I create an enum and assign the hex values for the control codes to them. enum ColorCode { White = 0, /**< White */ Black = 1, /**< Black

Python - a bytes like object is required, not str

隐身守侯 提交于 2019-12-02 21:45:18
I'm moving my Twitch bot from Python 2.7 to Python 3.5. I keep getting the error: a bytes like object is required not 'str' on the 2nd line of the code below. twitchdata = irc.recv(1204) data = twitchdata.split(":")[1] twitchuser = data.split("!")[0] twitchmsg = twitchdata.split(":")[2] chat = str(twitchuser) +": "+ str(twitchmsg) print(chat) #prints chat to console try data = twitchdata.decode().split(":")[1] instead of data = twitchdata.split(":")[1] 来源: https://stackoverflow.com/questions/29643544/python-a-bytes-like-object-is-required-not-str

Need some info on IRC BOTS using PERL

☆樱花仙子☆ 提交于 2019-12-02 17:40:34
问题 Does any one know of a good irc bot written in perl? I just need a simple one that logs on to said channel, then replies things based on what the user says. e.g. The user: <tgwizman> !time The bot replies <BlahBot> The time is 4:38:54 AM 回答1: Bot::BasicBot CPAN distribution contains several example bots. Projects Using POE page contains lists of POE-based IRC bots. See also answers here: CHATBOT: Programming a chatbot with Perl 回答2: Last time I made an IRC bot I used AnyEvent::IRC::Client.

'METHODNAME' as Client method versus irc_'METHODNAME' in twisted

让人想犯罪 __ 提交于 2019-12-02 14:31:09
问题 Looking at twisted.words.protocols.irc.IRCClient, it seems to me like there are some strangely redundant methods. For instance, there is a method 'privmsg' but also a method 'irc_PRIVMSG' As another example consider 'join' and 'irc_JOIN' What I want to know is why the redundancy, those are just two examples of many. Are the two different types used in different contexts? Are we supposed to use one type and not another? 回答1: You're on the right track about the two different types of methods

Need some info on IRC BOTS using PERL

你离开我真会死。 提交于 2019-12-02 11:00:11
Does any one know of a good irc bot written in perl? I just need a simple one that logs on to said channel, then replies things based on what the user says. e.g. The user: <tgwizman> !time The bot replies <BlahBot> The time is 4:38:54 AM Alexandr Ciornii Bot::BasicBot CPAN distribution contains several example bots. Projects Using POE page contains lists of POE-based IRC bots. See also answers here: CHATBOT: Programming a chatbot with Perl n0rd Last time I made an IRC bot I used AnyEvent::IRC::Client . The example there can be used to start developing your own bot. Also Net::IRC page suggests

PHP - IRC Bot Not sending message Help

佐手、 提交于 2019-12-02 07:03:23
问题 Currently I am making a IRC that sends a message onto the IRC main channel. Here is my code: <?php $ircServer = "xxxx"; $ircPort = "6667"; $ircChannel = "#bots"; set_time_limit(0); $msg = $_GET['msg']; $ircSocket = fsockopen($ircServer, $ircPort, $eN, $eS); if ($ircSocket) { fwrite($ircSocket, "USER Lost rawr.test lol :code\n"); fwrite($ircSocket, "NICK Rawr" . rand() . "\n"); fwrite($ircSocket, "JOIN " . $ircChannel . "\n"); fwrite($ircSocket, "PRIVMSG " . $channel . " :" . $msg = $_GET['msg