[mw-devel] [Git][arthur/mw][master] 3 commits: Remove obsolete client/bork.h

Andrew Price welshbyte at sucs.org
Thu Jan 14 18:26:28 GMT 2016


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
bdef2392 by Andrew Price at 2016-01-14T18:08:39Z
Remove obsolete client/bork.h

- - - - -
9a15f3f1 by Andrew Price at 2016-01-14T18:09:02Z
Fix a couple of unnecessary capitals

- - - - -
cc3727d6 by Andrew Price at 2016-01-14T18:18:45Z
Remove send_mesg()

Now that !tell is gone it's not needed.

- - - - -


5 changed files:

- − src/client/bork.h
- src/client/mesg.c
- src/client/mesg.h
- src/client/user.c
- src/gags.c


Changes:

=====================================
src/client/bork.h deleted
=====================================
--- a/src/client/bork.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#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
=====================================
--- a/src/client/mesg.c
+++ b/src/client/mesg.c
@@ -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
=====================================
--- a/src/client/mesg.h
+++ b/src/client/mesg.h
@@ -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
=====================================
--- a/src/client/user.c
+++ b/src/client/user.c
@@ -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 Password: ")),salt));
+		strcpy(passwd,crypt(get_pass(_("Enter password: ")),salt));
 		if (strcmp(passwd, usr->record.passwd))
 		{
-			printf(_("Login Incorrect.\n\n"));
+			printf(_("Login incorrect.\n\n"));
 			exit(0);
 		}
 	}
@@ -270,7 +270,7 @@ static int new_usr(char *name, struct user *u)
 		printf(_("\nIf you do not wish to register, do not enter a name.\n\n"));
 
 
-		printf(_("Real Name: "));
+		printf(_("Real name: "));
 		usr->realname[0]=0;
 		get_str(usr->realname,REALNAMESIZE);
 		if (!usr->realname[0])


=====================================
src/gags.c
=====================================
--- a/src/gags.c
+++ b/src/gags.c
@@ -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;



View it on GitLab: https://projects.sucs.org/arthur/mw/compare/7e8ca22f21aa9cc2776aa169c260e96572beab96...cc3727d6eef5ef2781ef85a9a762a48935c04acc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20160114/a205a940/attachment.html>


More information about the mw-devel mailing list