home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / EDIT02.ZIP / EDIT02.MOD next >
Encoding:
Text File  |  1995-06-30  |  11.7 KB  |  262 lines

  1. Apollo #1 @11138
  2. Sun Jun 25 22:38:28 1995
  3. ┌──────────────────────────────────────────────────────Filo─Header─(c)────┐
  4. │ Mod Name: Edit02.424    Mod Authors: Editor 149                         │
  5. │ Difficulty: ███▒▒▒▒▒▒▒(3.0/10)       @11138.WWIVNet                     │
  6. │ WWIV Version: v4.24                  @2939 TERRANet, IceNet, SierraLink │
  7. │ Date: 06/21/95                       @2938 CyberNet                     │
  8. │ Files Affected: MMENU.C, BBS.C                                          │
  9. │ Description: Send SSM's to All or to one user from WFC or from the Main │
  10. │              Menu.                                                      │
  11. └─────────────────────────────────────────────────────────────────────────┘
  12.  
  13. Extended Description:
  14. Adds //SSM and //SSM <UserName/UserNumber> commands to Main Menu For SysOps
  15. Ads ! command to WFC to send SSM's to all users
  16.  
  17. You can add Color to the SSM's using WWIV's standard ^P Codes.
  18. SysOp can send SSM's to networked addresses IE: 1@2800
  19.  
  20. Copyright Disclaimer:
  21. (c) 1995 Editor a.k.a #149@Retreat of the Gods  (209) 537-2808
  22. This mod is written for use by REGISTERED WWIV SysOps, as they are the only
  23. ones who should have the source code.  SysOps may freely upload this mod to
  24. any BBS or online service provided it is not edited in any way except to
  25. remove messge headers and/or taglines.  Shareware CDROM vendors are prohibited
  26. from distributing this mod without EXPRESS WRITTEN CONSENT from the author &
  27. Wayne Bell, Author of WWIV BBS Software.
  28. Parts of the code shown in this mod are:
  29.                 Copyright (C) 1988-1993 by Wayne Bell.
  30.  
  31. BACKUP your source
  32.  
  33. LEGEND:
  34. =   Old code, Search for this
  35. +   New code, Add this
  36. -   Remove or comment out this
  37. ... Go down several lines in the same function
  38.  
  39. Open: MMENU.C
  40. Find: void mainmenu(void)
  41. = static int mflag = 0, no_clear = 0;
  42. = long oldstat;
  43. = FILE *namefile;
  44. =
  45. + unsigned short un, sy;              /* Edit02.424 */
  46. + userrec u;                          /* Edit02.424 */
  47. +                                     /* Edit02.424 */
  48. = s2[0]=0;
  49. = if (usub[cursub].subnum==-1) {
  50. =   cursub=0;
  51. .
  52. .
  53. .
  54. =   if (strcmp(s,"PACK")==0) {
  55. =     nl();
  56. =     prt(5, get_string(1505));
  57. =     if (yn())
  58. =       pack_all_subs();
  59. =     else
  60. =       pack_sub(usub[cursub].subnum);
  61. =   }
  62. +   if (strcmp(s, "SSM")==0) {        /* Edit02.424 */
  63. +     nl();                           /* Edit02.424 */
  64. +     nl();                           /* Edit02.424 */
  65. +     prt(2, "Send a short message to everyone?");
  66. +                                     /* Edit02.424 */
  67. +     if (yn()) {                     /* Edit02.424 */
  68. +       nl();                         /* Edit02.424 */
  69. +       prt(1, "Enter short message now.");
  70. +                                     /* Edit02.424 */
  71. +       nl();                         /* Edit02.424 */
  72. +       prt(2, ": ");                 /* Edit02.424 */
  73. +       mpl(70);                      /* Edit02.424 */
  74. +       ansic(4);                     /* Edit02.424 */
  75. +       inli(s1, "", 70, 1);          /* Edit02.424 */
  76. +       if (s1[0]==NULL) {            /* Edit02.424 */
  77. +         pl(get_string(14));         /* Edit02.424 */
  78. +         nl();                       /* Edit02.424 */
  79. +       } else {                      /* Edit02.424 */
  80. +         i=0;                        /* Edit02.424 */
  81. +         outstr(get_string(356));    /* Edit02.424 */
  82. +         do {                        /* Edit02.424 */
  83. +           if(i%5==0)                /* Edit02.424 */
  84. +             npr("\b\b\b\b%4d", i);  /* Edit02.424 */
  85. +           read_user(i, &u);         /* Edit02.424 */
  86. +           if ((u.inact & inact_deleted)==0) {
  87. +                                     /* Edit02.424 */
  88. +             ssm(i, 0, s1);          /* Edit02.424 */
  89. +             i++;                    /* Edit02.424 */
  90. +           }                         /* Edit02.424 */
  91. +         } while ((i<=((status.users)+1)) && (!hangup));
  92. +                                     /* Edit02.424 */
  93. +         nl();                       /* Edit02.424 */
  94. +         npr("%d SSM's sent.", i);   /* Edit02.424 */
  95. +         nl();                       /* Edit02.424 */
  96. +       }                             /* Edit02.424 */
  97. +     } else {                        /* Edit02.424 */
  98. +       prt(1, get_string(15));       /* Edit02.424 */
  99. +       nl();                         /* Edit02.424 */
  100. +       prt(2, ": ");                 /* Edit02.424 */
  101. +       mpl(70);                      /* Edit02.424 */
  102. +       ansic(4);                     /* Edit02.424 */
  103. +       inli(s1, "", 70, 1);          /* Edit02.424 */
  104. +       parse_email_info(s1, &un, &sy);
  105. +                                     /* Edit02.424 */
  106. +       if(un || sy) {                /* Edit02.424 */
  107. +         prt(1, "Enter short message now.");
  108. +                                     /* Edit02.424 */
  109. +         nl();                       /* Edit02.424 */
  110. +         prt(2, ": ");               /* Edit02.424 */
  111. +         mpl(70);                    /* Edit02.424 */
  112. +         ansic(4);                   /* Edit02.424 */
  113. +         inli(s1, "", 70, 1);        /* Edit02.424 */
  114. +         if (s1[0]==NULL) {          /* Edit02.424 */
  115. +           pl(get_string(14));       /* Edit02.424 */
  116. +           nl();                     /* Edit02.424 */
  117. +         } else {                    /* Edit02.424 */
  118. +           ssm(un, sy, s1);          /* Edit02.424 */
  119. +           npr("%d SSM's sent.", 1); /* Edit02.424 */
  120. +           nl();                     /* Edit02.424 */
  121. +         }                           /* Edit02.424 */
  122. +       } else {                      /* Edit02.424 */
  123. +         pl(get_string(8));          /* Edit02.424 */
  124. +         nl();                       /* Edit02.424 */
  125. +       }                             /* Edit02.424 */
  126. +     }                               /* Edit02.424 */
  127. +   }                                 /* Edit02.424 */
  128. +                                     /* Edit02.424 */
  129. +   if (strncmp(s, "SSM ", 4)==0) {   /* Edit02.424 */
  130. +     strrev(s);                      /* Edit02.424 */
  131. +     i=strlen(s);                    /* Edit02.424 */
  132. +     s[i-4]=NULL;                    /* Edit02.424 */
  133. +     strrev(s);                      /* Edit02.424 */
  134. +     strcpy(s1, s);                  /* Edit02.424 */
  135. +     parse_email_info(s1, &un, &sy); /* Edit02.424 */
  136. +     if(un || sy) {                  /* Edit02.424 */
  137. +       prt(1, "Enter short message now.");
  138. +                                     /* Edit02.424 */
  139. +       nl();                         /* Edit02.424 */
  140. +       prt(2, ": ");                 /* Edit02.424 */
  141. +       mpl(70);                      /* Edit02.424 */
  142. +       ansic(4);                     /* Edit02.424 */
  143. +       inli(s1, "", 70, 1);          /* Edit02.424 */
  144. +       if (s1[0]==NULL) {            /* Edit02.424 */
  145. +         pl(get_string(14));         /* Edit02.424 */
  146. +         nl();                       /* Edit02.424 */
  147. +       } else {                      /* Edit02.424 */
  148. +         ssm(un, sy, s1);            /* Edit02.424 */
  149. +         npr("%d SSM's sent.", 1);   /* Edit02.424 */
  150. +         nl();                       /* Edit02.424 */
  151. +       }                             /* Edit02.424 */
  152. +     } else {                        /* Edit02.424 */
  153. +       pl(get_string(8));            /* Edit02.424 */
  154. +       nl();                         /* Edit02.424 */
  155. +     }                               /* Edit02.424 */
  156. +   }                                 /* Edit02.424 */
  157. = }
  158. =/**************************************************/
  159. =
  160. = if (cs()) {
  161. =   if (strcmp(s,"IVOTES")==0) {
  162.  
  163. Load up: BBS.C
  164. Find: void getcaller(void)
  165. = double d;
  166. = userrec tu;
  167. + unsigned short un, sy;              /* Edit02.424 */
  168. +                                     /* Edit02.424 */
  169. = c_sub=c_dir=0;
  170. =
  171. = cid_num[0]=0;
  172. = cid_name[0]=0;
  173. = frequent_init();
  174. .
  175. .
  176. .
  177. =       case 9:
  178. =         if (ok_local()) {
  179. =           holdphone(1);
  180. =           instance_edit();
  181. =           holdphone(0);
  182. =         }
  183. =         break;
  184. +       case '!':                     /* Edit02.424 */
  185. +         prt(2, "Send a short message to everyone?");
  186. +                                     /* Edit02.424 */
  187. +         if (yn()) {                 /* Edit02.424 */
  188. +           nl();                     /* Edit02.424 */
  189. +           prt(1, "Enter short message now.");
  190. +                                     /* Edit02.424 */
  191. +           nl();                     /* Edit02.424 */
  192. +           prt(2, ": ");             /* Edit02.424 */
  193. +           mpl(70);                  /* Edit02.424 */
  194. +           ansic(4);                 /* Edit02.424 */
  195. +           inli(s, "", 70, 1);       /* Edit02.424 */
  196. +           if (s[0]==NULL) {         /* Edit02.424 */
  197. +             pl(get_string(14));     /* Edit02.424 */
  198. +             nl();                   /* Edit02.424 */
  199. +           } else {                  /* Edit02.424 */
  200. +             i=0;                    /* Edit02.424 */
  201. +             outstr(get_string(356));/* Edit02.424 */
  202. +             do {                    /* Edit02.424 */
  203. +               if(i%5==0)            /* Edit02.424 */
  204. +                 npr("\b\b\b\b%4d", i);
  205. +                                     /* Edit02.424 */
  206. +               read_user(i, &tu);    /* Edit02.424 */
  207. +               if ((tu.inact & inact_deleted)==0) {
  208. +                                     /* Edit02.424 */
  209. +                 ssm(i, 0, s);       /* Edit02.424 */
  210. +                 i++;                /* Edit02.424 */
  211. +               }                     /* Edit02.424 */
  212. +             } while ((i<=((status.users)+1)) && (!hangup));
  213. +                                     /* Edit02.424 */
  214. +             nl();                   /* Edit02.424 */
  215. +             npr("%d SSM's sent.", i);
  216. +                                     /* Edit02.424 */
  217. +             nl();                   /* Edit02.424 */
  218. +           }                         /* Edit02.424 */
  219. +         } else {                    /* Edit02.424 */
  220. +           prt(1, get_string(15));   /* Edit02.424 */
  221. +           nl();                     /* Edit02.424 */
  222. +           prt(2, ": ");             /* Edit02.424 */
  223. +           mpl(70);                  /* Edit02.424 */
  224. +           ansic(4);                 /* Edit02.424 */
  225. +           inli(ss, "", 70, 1);      /* Edit02.424 */
  226. +           parse_email_info(ss, &un, &sy);
  227. +                                     /* Edit02.424 */
  228. +           if(un || sy) {            /* Edit02.424 */
  229. +             prt(1, "Enter short message now.");
  230. +                                     /* Edit02.424 */
  231. +             nl();                   /* Edit02.424 */
  232. +             prt(2, ": ");           /* Edit02.424 */
  233. +             mpl(70);                /* Edit02.424 */
  234. +             ansic(4);               /* Edit02.424 */
  235. +             inli(s, "", 70, 1);     /* Edit02.424 */
  236. +             if (s[0]==NULL) {       /* Edit02.424 */
  237. +               pl(get_string(14));   /* Edit02.424 */
  238. +               nl();                 /* Edit02.424 */
  239. +             } else {                /* Edit02.424 */
  240. +               ssm(un, sy, s);       /* Edit02.424 */
  241. +               npr("%d SSM's sent.", 1);
  242. +                                     /* Edit02.424 */
  243. +               nl();                 /* Edit02.424 */
  244. +             }                       /* Edit02.424 */
  245. +           } else {                  /* Edit02.424 */
  246. +             pl(get_string(8));      /* Edit02.424 */
  247. +             nl();                   /* Edit02.424 */
  248. +           }                         /* Edit02.424 */
  249. +         }                           /* Edit02.424 */
  250. +         break;                      /* Edit02.424 */
  251. =     }
  252. =     if (!incom && !lokb) {
  253. =       frequent_init();
  254.  
  255.  
  256. Done.
  257.  
  258. Save, Recompile and run.
  259. As you can see, it's very easy and you only have to change two files!
  260.  
  261. Editor
  262.