回精華區
作者itoc.bbs@processor.tfcis.org (核心動力) 看板: plan
標題Re: 20041002 的版本 (使用者名單)
時間動力核心 (2004/10/03 Sun 00:20:41) Updated: 2004/10/03
※ 引述《itoc (核心動力)》之銘言:
>   為了程式方便,改了以下 feature:
>   7. 「壞人」會排序在最後

  將 壞人和一般使用者 混雜在一起排序

: ulist.c:ulist_cmp_userid()
: ulist.c:ulist_cmp_host()
: ulist.c:ulist_cmp_mode()

- int k = ulist_ftype[(*i) - ushm->uslot] - ulist_ftype[(*j) - ushm->uslot];
+ /* 壞人 及 一般使用者 不分開排序 */
+ int ftypeI = ulist_ftype[(*i) - ushm->uslot];
+ int ftypeJ = ulist_ftype[(*j) - ushm->uslot];
+ int k = ((ftypeI|ftypeJ) == (FTYPE_NORMAL|FTYPE_MYBAD)) ? 0 : ftypeI-ftypeJ;
  return k ? k : ... ;

--
  Origin:  Maple-itoc˙動力核心  processor.tfcis.org 
  Author: itoc itoc.Dorm11.NCTU.edu.tw 發表
精華選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻