Răsfoiți Sursa

* Fixed the order of notes checking on dcc

svn: 1106
Bryan Drewery 22 ani în urmă
părinte
comite
60dce69fe6
3 a modificat fișierele cu 4 adăugiri și 9 ștergeri
  1. 1 0
      src/dccutil.c
  2. 2 9
      src/mod/notes.mod/notes.c
  3. 1 0
      src/mod/notes.mod/notes.h

+ 1 - 0
src/dccutil.c

@@ -247,6 +247,7 @@ void dcc_chatter(int idx)
 
 
   show_motd(idx);
   show_motd(idx);
 
 
+  notes_chon(idx);
   if (glob_party(fr)) {
   if (glob_party(fr)) {
      i = dcc[idx].u.chat->channel;
      i = dcc[idx].u.chat->channel;
   } else {
   } else {

+ 2 - 9
src/mod/notes.mod/notes.c

@@ -712,10 +712,10 @@ static void away_notes(char *bot, int idx, char *msg)
     notes_read(dcc[idx].nick, 0, "+", idx);
     notes_read(dcc[idx].nick, 0, "+", idx);
 }
 }
 
 
-static int chon_notes(char *nick, int idx)
+int chon_notes(int idx)
 {
 {
   if (dcc[idx].type == &DCC_CHAT)
   if (dcc[idx].type == &DCC_CHAT)
-    notes_read(nick, 0, "+", idx);
+    notes_read(dcc[idx].nick, 0, "+", idx);
   return 0;
   return 0;
 }
 }
 
 
@@ -731,12 +731,6 @@ static cmd_t notes_away[] =
   {NULL,	NULL,	NULL,				NULL}
   {NULL,	NULL,	NULL,				NULL}
 };
 };
 
 
-static cmd_t notes_chon[] =
-{
-  {"*",		"",	(Function) chon_notes,		"notes"},
-  {NULL,	NULL,	NULL,				NULL}
-};
-
 static cmd_t notes_msgs[] =
 static cmd_t notes_msgs[] =
 {
 {
   {"notes",	"",	(Function) msg_notes,		NULL},
   {"notes",	"",	(Function) msg_notes,		NULL},
@@ -765,7 +759,6 @@ void notes_init()
 
 
   add_builtins("dcc", notes_cmds);
   add_builtins("dcc", notes_cmds);
   add_builtins("away", notes_away);
   add_builtins("away", notes_away);
-  add_builtins("chon", notes_chon);
   add_builtins("nkch", notes_nkch);
   add_builtins("nkch", notes_nkch);
 
 
   notes_server_setup(0);
   notes_server_setup(0);

+ 1 - 0
src/mod/notes.mod/notes.h

@@ -65,5 +65,6 @@ void fwd_display(int, struct user_entry *, struct userrec *);
 int num_notes(const char *);
 int num_notes(const char *);
 void notes_report(int, int);
 void notes_report(int, int);
 int storenote(char *, char *, char *, int, char *, int);
 int storenote(char *, char *, char *, int, char *, int);
+int notes_chon(int);
 
 
 #endif				/* _EGG_MOD_NOTES_H */
 #endif				/* _EGG_MOD_NOTES_H */