Quellcode durchsuchen

* share.mod fix
* Removed bot_handshake


svn: 922

Bryan Drewery vor 22 Jahren
Ursprung
Commit
085e7b9f72
4 geänderte Dateien mit 7 neuen und 17 gelöschten Zeilen
  1. 0 11
      src/botcmd.c
  2. 1 1
      src/cmds.c
  3. 5 4
      src/mod/share.mod/share.c
  4. 1 1
      src/userent.c

+ 0 - 11
src/botcmd.c

@@ -949,16 +949,6 @@ static void bot_hublog(char *botnick, char *code, char *msg)
 #endif /* HUB */
 }
 
-static void bot_handshake(int idx, char *par)
-{
-  struct userrec *u = get_user_by_handle(userlist, dcc[idx].nick);
-
-  /* We *don't* want botnet passwords migrating */
-  noshare = 1;
-  set_user(&USERENTRY_PASS, u, par);
-  noshare = 0;
-}
-
 /* Used to send a direct msg from Tcl on one bot to Tcl on another
  * zapf <frombot> <tobot> <code [param]>
  */
@@ -1266,7 +1256,6 @@ botcmd_t C_bot[] =
   {"ct",		(Function) bot_chat},
   {"e",			(Function) bot_error},
   {"el",		(Function) bot_endlink},
-  {"hs",		(Function) bot_handshake},
   {"i",			(Function) bot_idle},
   {"i?",		(Function) bot_infoq},
   {"j",			(Function) bot_join},

+ 1 - 1
src/cmds.c

@@ -4097,7 +4097,7 @@ static void cmd_quit(struct userrec *u, int idx, char *text)
  */
 cmd_t C_dcc[] =
 {
-  {"+host",		"m|m",	(Function) cmd_pls_host,	NULL},
+  {"+host",		"j",	(Function) cmd_pls_host,	NULL},
   {"+ignore",		"m",	(Function) cmd_pls_ignore,	NULL},
   {"+user",		"m",	(Function) cmd_pls_user,	NULL},
 #ifdef HUB

+ 5 - 4
src/mod/share.mod/share.c

@@ -1481,7 +1481,7 @@ finish_share(int idx)
   unlink(dcc[idx].u.xfer->filename);    //I mean really, shit fills up the quota fast.
 
   loading = 0;
-  putlog(LOG_BOTS, "@", "%s.", USERF_XFERDONE);
+  putlog(LOG_BOTS, "*", "%s.", USERF_XFERDONE);
 
   clear_chanlist();             /* Remove all user references from the
                                  * channel lists.                       */
@@ -1494,6 +1494,7 @@ finish_share(int idx)
    *   - unshared (got_share == 0) user entries
    *   - old bot flags and passwords
    */
+  noshare = 1;
   fr.match = (FR_CHAN | FR_BOT);
   for (u = userlist; u; u = u->next) {
     struct userrec *u2 = get_user_by_handle(ou, u->handle);
@@ -1510,7 +1511,6 @@ finish_share(int idx)
       struct chanuserrec *cr = NULL, *cr_next = NULL, *cr_old = NULL;
       struct user_entry *ue = NULL;
 
-      noshare = 1;
       for (cr = u2->chanrec; cr; cr = cr_next) {
         struct chanset_t *mychan = findchan_by_dname(cr->channel);
 
@@ -1526,15 +1526,16 @@ finish_share(int idx)
           }
         cr_old = cr;
       }
-      noshare = 0;
+
       /* Any unshared user entries need copying over */
       for (ue = u2->entries; ue; ue = ue->next)
         if (ue->type && !ue->type->got_share && ue->type->dup_user)
           ue->type->dup_user(u, u2, ue);
     }
   }
+  noshare = 0;
   clear_userlist(ou);
-
+  
   unlink(dcc[idx].u.xfer->filename);    /* Done with you!               */
 
   checkchans(1);                /* remove marked channels */

+ 1 - 1
src/userent.c

@@ -544,7 +544,7 @@ int pass_set(struct userrec *u, struct user_entry *e, void *buf)
       encrypt_pass(pass, new);
     e->u.extra = strdup(new);
   }
-  if (!noshare)
+  if (!noshare && !(u->flags & USER_BOT))
     shareout(NULL, "c PASS %s %s\n", u->handle, pass ? pass : "");
   return 1;
 }