File tree Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Original file line number Diff line number Diff line change 1
1
MIT License
2
2
3
- Copyright (c) 2021-2023 Michael Czigler
3
+ Copyright (c) 2021-2025 Michael Czigler
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change 1
1
/*
2
2
* SPDX-License-Identifier: MIT
3
- * Copyright (C) 2023 Michael Czigler
3
+ * Copyright (C) 2025 Michael Czigler
4
4
*/
5
5
6
6
#include "kirc.h"
@@ -1839,7 +1839,6 @@ int main(int argc, char **argv)
1839
1839
dcc_dir = optarg ;
1840
1840
break ;
1841
1841
case 'x' :
1842
- cmds = 1 ;
1843
1842
inic = argv [optind ];
1844
1843
break ;
1845
1844
case '?' :
@@ -1850,12 +1849,6 @@ int main(int argc, char **argv)
1850
1849
if (dcc ) {
1851
1850
sigaction (SIGPIPE , & (struct sigaction ){.sa_handler = SIG_IGN }, NULL );
1852
1851
}
1853
- if (cmds ) {
1854
- int flag = 0 ;
1855
- for (int i = 0 ; i < CBUF_SIZ && flag > -1 ; i ++ ) {
1856
- flag = read (STDIN_FILENO , & cbuf [i ], 1 );
1857
- }
1858
- }
1859
1852
if (!nick ) {
1860
1853
fputs ("Nick not specified\n" , stderr );
1861
1854
usage ();
@@ -1875,13 +1868,8 @@ int main(int argc, char **argv)
1875
1868
if (pass ) {
1876
1869
raw ("PASS %s\r\n" , pass );
1877
1870
}
1878
- if (cmds > 0 ) {
1879
- for (char * tok = strtok (cbuf , "\n" ); tok ; tok = strtok (NULL , "\n" )) {
1880
- raw ("%s\r\n" , tok );
1881
- }
1882
- if (inic ) {
1883
- raw ("%s\r\n" , inic );
1884
- }
1871
+ if (inic ) {
1872
+ raw ("%s\r\n" , inic );
1885
1873
}
1886
1874
for (int i = 0 ; i < CON_MAX ; i ++ ) {
1887
1875
slot_clear (i );
Original file line number Diff line number Diff line change 8
8
9
9
#define _POSIX_C_SOURCE 200809L
10
10
#define CTCP_CMDS "ACTION VERSION TIME CLIENTINFO PING DCC"
11
- #define VERSION "0.3.2 "
11
+ #define VERSION "0.3.3 "
12
12
#define TESTCHARS "\xe1\xbb\xa4"
13
13
#define MSG_MAX 512 /* irc rfc says lines are 512 char's max, but servers can accept more */
14
14
#define CHA_MAX 200
22
22
#define POLL_TIMEOUT 180000 /* 3 minutes */ /* argument is in miliseconds */
23
23
#define CON_MAX 20
24
24
#define BACKLOG 100 /* DCC SEND listen() backlog */
25
- #define CBUF_SIZ 1024
26
25
#define DCC_FLAGS (O_WRONLY | O_APPEND)
27
26
#define DCC_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
28
27
#define STR_ (a ) #a
@@ -69,8 +68,6 @@ static char *auth = NULL; /* PLAIN SASL token */
69
68
static char * real = NULL ; /* real name */
70
69
static char * olog = NULL ; /* chat log path */
71
70
static char * inic = NULL ; /* additional server command */
72
- static char cmds = 0 ; /* indicates additional server commands */
73
- static char cbuf [CBUF_SIZ ]; /* additional stdin server commands */
74
71
75
72
/* define function macros */
76
73
#define htonll (x ) ((1==htonl(1)) ? (x) : (((uint64_t)htonl((x) & 0xFFFFFFFFUL)) << 32) | htonl((uint32_t)((x) >> 32)))
You can’t perform that action at this time.
0 commit comments