Here's the one I use, with a few scripts I wrote. It's in Javascript (with Node.js), if you read the API it shouldn't be really complicated.Not to mention that version isn't fully released yet ;)
https://github.com/Eeems/EeeZorBot/tree/re-org
https://github.com/juju2143/EeeZorBot-scripts
I want to program my IRC Bot in CYou might want to lead off with what language you want to work with at the start of the topic next time.
C is a pretty terrible choice for an IRC bot, because manual string buffering and all that, and it's not a program that's performance-critical. you should really try using something else for this use case
I feel that Python will bloat my computer and I also need to download it on my school computer if I want to program the IRC bot on he school computer. I feel that programming the IRC Bot in C will be more portable for coding. Where's the IRC Bot tutorial for C?Python is no less bloat than any other unless you install a bunch of stuff for an IDE, if you were to use one, and as for portablity my pick is p[ython aswell.
I want to do it with Java because I'll need to learn it eventually for Web Programming. How do I program a IRC Bot in Java?
I feel that Python will bloat my computer and I also need to download it on my school computer if I want to program the IRC bot on he school computer. I feel that programming the IRC Bot in C will be more portable for coding. Where's the IRC Bot tutorial for C?Java requires installing a massive JRE (50+ MBs) and JDK (157+ MBs), and is known to have many, many security risks. Python, on the other hand, is a very minimal language, coming in only at 17 MBs - both the development environment and the things you need to run what you make.
I feel that Python will bloat my computer and I also need to download it on my school computer if I want to program the IRC bot on he school computer. I feel that programming the IRC Bot in C will be more portable for coding. Where's the IRC Bot tutorial for C?
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
int conn;
char sbuf[512];
void raw(char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
vsnprintf(sbuf, 512, fmt, ap);
va_end(ap);
printf("<< %s", sbuf);
write(conn, sbuf, strlen(sbuf));
}
int main() {
char *nick = "EphraBoT";
char *channel = "bottest";
char *host = "irc.choopa.net";
char *port = "6667";
char *user, *command, *where, *message, *sep, *target;
int i, j, l, sl, o = -1, start, wordcount;
char buf[513];
struct addrinfo hints, *res;
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
getaddrinfo(host, port, &hints, &res);
conn = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
connect(conn, res->ai_addr, res->ai_addrlen);
raw("USER %s 0 0 :%s\r\n", nick, nick);
raw("NICK %s\r\n", nick);
while ((sl = read(conn, sbuf, 512))) {
for (i = 0; i < sl; i++) {
o++;
buf[o] = sbuf[i];
if ((i > 0 && sbuf[i] == '\n' && sbuf[i - 1] == '\r') || o == 512) {
buf[o + 1] = '\0';
l = o;
o = -1;
printf(">> %s", buf);
if (!strncmp(buf, "PING", 4)) {
buf[1] = 'O';
raw(buf);
} else if (buf[0] == ':') {
wordcount = 0;
user = command = where = message = NULL;
for (j = 1; j < l; j++) {
if (buf[j] == ' ') {
buf[j] = '\0';
wordcount++;
switch(wordcount) {
case 1: user = buf + 1; break;
case 2: command = buf + start; break;
case 3: where = buf + start; break;
}
if (j == l - 1) continue;
start = j + 1;
} else if (buf[j] == ':' && wordcount == 3) {
if (j < l - 1) message = buf + j + 1;
break;
}
}
if (wordcount < 2) continue;
if (!strncmp(command, "001", 3) && channel != NULL) {
raw("JOIN %s\r\n", channel);
} else if (!strncmp(command, "PRIVMSG", 7) || !strncmp(command, "NOTICE", 6)) {
if (where == NULL || message == NULL) continue;
if ((sep = strchr(user, '!')) != NULL) user[sep - user] = '\0';
if (where[0] == '#' || where[0] == '&' || where[0] == '+' || where[0] == '!') target = where; else target = user;
printf("[from: %s] [reply-with: %s] [where: %s] [reply-to: %s] %s", user, command, where, target, message);
}
The tutorial is showing setting up Python with the terminal. I want to know how to do this in Windows.
The tutorial is showing setting up Python with the terminal. I want to know how to do this in Windows.
I want to make the directories through File Explorer, not Powershell.I don't think anybody's stopping you from doing so.