File: zzstud.hack

package info (click to toggle)
ircd 2.10.07-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,232 kB
  • ctags: 2,253
  • sloc: ansic: 27,541; makefile: 742; sh: 327; perl: 18
file content (68 lines) | stat: -rw-r--r-- 1,946 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff --minimal --new-file --recursive --show-c-function --unified=3 orig/include/s_conf.h build/include/s_conf.h
--- orig/include/s_conf.h	Sat Oct  3 11:32:23 1998
+++ build/include/s_conf.h	Wed Jan 27 05:16:17 1999
@@ -65,7 +65,11 @@ struct ConfItem {
 };
 
 struct MotdItem {
+#ifndef STUDLYT
   char line[82];
+#else
+  char line[256];
+#endif
   struct MotdItem *next;
 };
 
diff --minimal --new-file --recursive --show-c-function --unified=3 orig/ircd/querycmds.c build/ircd/querycmds.c
--- orig/ircd/querycmds.c	Wed Jan 27 05:15:21 1999
+++ build/ircd/querycmds.c	Wed Jan 27 05:30:17 1999
@@ -370,6 +370,10 @@ int m_motd(aClient *cptr, aClient *sptr,
   {
     for (ptr = tdata; ptr; ptr = ptr->next)
     {
+#if STUDLYT
+      if (!match(ptr->hostmask, cptr->myhost))
+	break;
+#endif
       if (!match(ptr->hostmask, cptr->sockhost))
 	break;
     }
@@ -402,7 +406,23 @@ int m_motd(aClient *cptr, aClient *sptr,
       count = 3;
     for (; temp; temp = temp->next)
     {
+#ifndef STUDLYT
       sendto_one(sptr, rpl_str(RPL_MOTD), me.name, parv[0], temp->line);
+#else
+      switch (temp->line[0])
+	{
+	case '>':
+	  sendto_one(sptr, ":%s NOTICE %s :%s", me.name, parv[0],
+		     &temp->line[1]);
+	  break;
+	case '^':
+	  sendto_one(sptr, ":%s PRIVMSG %s :%s", me.name, parv[0],
+		     &temp->line[1]);
+	  break;
+	default:
+	  sendto_one(sptr, rpl_str(RPL_MOTD), me.name, parv[0], temp->line);
+	}
+#endif
       if (--count == 0)
 	break;
     }
diff --minimal --new-file --recursive --show-c-function --unified=3 orig/ircd/s_conf.c build/ircd/s_conf.c
--- orig/ircd/s_conf.c	Wed Jan 27 03:25:59 1999
+++ build/ircd/s_conf.c	Wed Jan 27 05:16:17 1999
@@ -1561,7 +1561,11 @@ aMotdItem *read_motd(char *motdfile)
   int fd;
   register aMotdItem *temp, *newmotd, *last;
   struct stat sb;
+#ifndef STUDLYT
   char line[80];
+#else
+  char line[254];
+#endif
   register char *tmp;
 
   if ((fd = open(motdfile, O_RDONLY)) == -1)