mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 02:05:16 +03:00
44 lines
1.1 KiB
Diff
44 lines
1.1 KiB
Diff
From b158567d16bbc82ce289d96456d66e45c8a7154c Mon Sep 17 00:00:00 2001
|
|
From: Natanael Copa <ncopa@alpinelinux.org>
|
|
Date: Wed, 1 Aug 2018 17:44:16 +0200
|
|
Subject: [PATCH] add simple hack to allow nickserv identification
|
|
|
|
pass -c "nickserv :identify <password>!
|
|
---
|
|
sircbot.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/sircbot.c b/sircbot.c
|
|
index 5a40695..51572c0 100644
|
|
--- a/sircbot.c
|
|
+++ b/sircbot.c
|
|
@@ -608,12 +608,16 @@ int main(int argc, char *argv[])
|
|
const char *username = "sircbot";
|
|
const char *pass = NULL;
|
|
const char *logfile = "/dev/null";
|
|
+ const char *connmsg = NULL;
|
|
struct sircbot_session sb;
|
|
int i, c, port = 6667, multimode = 0;
|
|
|
|
sb.runhooks = 1;
|
|
- while ((c = getopt(argc, argv, "fl:mn:Np:P:r:s:u:")) != -1) {
|
|
+ while ((c = getopt(argc, argv, "c:fl:mn:Np:P:r:s:u:")) != -1) {
|
|
switch (c) {
|
|
+ case 'c':
|
|
+ connmsg = optarg;
|
|
+ break;
|
|
case 'f':
|
|
foreground = 1;
|
|
break;
|
|
@@ -698,6 +702,8 @@ int main(int argc, char *argv[])
|
|
sleep(10);
|
|
continue;
|
|
}
|
|
+ if (connmsg)
|
|
+ irc_send(sb.sess, "PRIVMSG", connmsg);
|
|
|
|
irc_loop(&sb);
|
|
irc_close(sb.sess, "bye");
|
|
--
|
|
2.18.0
|
|
|