Skip to content
GitLab
Explore
Sign in
Commits on Source (3)
Remove obsolete client/bork.h
· bdef2392
Andrew Price
authored
Jan 14, 2016
bdef2392
Fix a couple of unnecessary capitals
· 9a15f3f1
Andrew Price
authored
Jan 14, 2016
9a15f3f1
Remove send_mesg()
· cc3727d6
Andrew Price
authored
Jan 14, 2016
Now that !tell is gone it's not needed.
cc3727d6
Hide whitespace changes
Inline
Side-by-side
src/client/bork.h
deleted
100644 → 0
View file @
7e8ca22f
#ifndef BORK_H
#define BORK_H
#include
"gagtable.h"
char
*
apply_bork
(
char
*
text
,
const
struct
pattern
*
list
,
int
caps
);
#endif
/* BORK_H */
src/client/mesg.c
View file @
cc3727d6
...
...
@@ -18,39 +18,6 @@
extern
struct
user
*
const
user
;
void
send_mesg
(
char
*
from
,
const
char
*
to
,
char
*
text
,
int
wiz
)
{
char
buff
[
MAXTEXTLENGTH
];
_autofree
struct
user
*
usr
=
calloc
(
1
,
sizeof
(
*
usr
));
if
(
usr
==
NULL
)
{
perror
(
"calloc"
);
return
;
}
if
(
!
user_exists
(
to
,
usr
))
{
printf
(
_
(
"User does not exist.
\n
"
));
return
;
}
if
(
!
u_reg
(
usr
))
{
printf
(
_
(
"%s is not registered.
\n
"
),
to
);
return
;
}
if
(
u_mesg
(
usr
))
{
if
(
wiz
)
{
printf
(
_
(
"%s has msg off, writing anyway.
\n
"
),
to
);
}
else
{
printf
(
_
(
"%s has turned messages off.
\n
"
),
to
);
return
;
}
}
snprintf
(
buff
,
MAXTEXTLENGTH
,
"*** %s: %s"
,
from
,
text
);
if
(
ipc_send_to_username
(
to
,
IPC_WIZ
,
buff
)
<=
0
)
{
printf
(
_
(
"User not logged on.
\n
"
));
return
;
}
mwlog
(
"TELL %s %s"
,
to
,
text
);
}
void
inform_of_mail
(
char
*
to
)
{
if
(
ipc_send_to_username
(
to
,
IPC_NEWMAIL
,
NULL
)
<
0
)
...
...
src/client/mesg.h
View file @
cc3727d6
...
...
@@ -6,7 +6,6 @@
void
broadcast
(
int
state
,
const
char
*
fmt
,
...)
__attribute__
((
format
(
printf
,
2
,
3
)));
void
inform_of_mail
(
char
*
to
);
void
postinfo
(
struct
user
*
who
,
struct
folder
*
fol
,
struct
Header
*
mesg
);
void
send_mesg
(
char
*
from
,
const
char
*
to
,
char
*
text
,
int
wiz
);
void
mwlog
(
const
char
*
fmt
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
#endif
/* MESG_H */
src/client/user.c
View file @
cc3727d6
...
...
@@ -56,10 +56,10 @@ static int old_usr(struct user *usr)
{
strncpy
(
salt
,
usr
->
record
.
passwd
,
2
);
fflush
(
stdin
);
strcpy
(
passwd
,
crypt
(
get_pass
(
_
(
"Enter
P
assword: "
)),
salt
));
strcpy
(
passwd
,
crypt
(
get_pass
(
_
(
"Enter
p
assword: "
)),
salt
));
if
(
strcmp
(
passwd
,
usr
->
record
.
passwd
))
{
printf
(
_
(
"Login
I
ncorrect.
\n\n
"
));
printf
(
_
(
"Login
i
ncorrect.
\n\n
"
));
exit
(
0
);
}
}
...
...
@@ -270,7 +270,7 @@ static int new_usr(char *name, struct user *u)
printf
(
_
(
"
\n
If you do not wish to register, do not enter a name.
\n\n
"
));
printf
(
_
(
"Real
N
ame: "
));
printf
(
_
(
"Real
n
ame: "
));
usr
->
realname
[
0
]
=
0
;
get_str
(
usr
->
realname
,
REALNAMESIZE
);
if
(
!
usr
->
realname
[
0
])
...
...
src/gags.c
View file @
cc3727d6
...
...
@@ -40,7 +40,7 @@ void gag_ack(char *text);
void
gag_hazelesque
(
char
*
text
);
void
gag_pklong
(
char
*
text
);
void
gag_unreturnable
(
char
*
text
);
char
*
apply_bork
(
char
*
text
,
const
gag_pattern_t
*
list
,
int
caps
);
static
char
*
apply_bork
(
char
*
text
,
const
gag_pattern_t
*
list
,
int
caps
);
/****
* List ALL the gags
...
...
@@ -765,7 +765,7 @@ void gag_pklong(char *text)
/**
* old style lookup table gag filters
**/
char
*
apply_bork
(
char
*
text
,
const
gag_pattern_t
*
list
,
int
caps
)
static
char
*
apply_bork
(
char
*
text
,
const
gag_pattern_t
*
list
,
int
caps
)
{
static
char
buff
[
MAXTEXTLENGTH
];
int
tp
=
0
,
bp
=
0
;
...
...