2003.01.23 (木) 17:15:15 <u*j*2*6*> stypes.pasが修正の中心になります
2003.01.24 (金) 01:07:07 <u*j*2*6*> '!'はつかえないようにしようとおもった
shuusei21193:日本語IDに対応

diff --dos -urN 21192/bans.pas 21193/bans.pas
--- 21192/bans.pas	Fri Oct 04 23:34:24 2002
+++ 21193/bans.pas	Thu Jan 23 17:05:10 2003
@@ -117,7 +117,7 @@
  if ip='*.*' then ip:='*';
  if ip='*.*.*' then ip:='*';
  if ip='*.*.*.*' then ip:='*';
- Result:=lowercase(user)+'!'+lowercase(ip);
+ Result:=AnsiLowerCase(user)+'!'+lowercase(ip);
 end;
 
 function CheckBan(rec: String): String;
@@ -136,7 +136,7 @@
  with data^ do
  begin
    Pointer(user):=nil;
-   user:=lowercase(Value.user);
+   user:=AnsiLowerCase(Value.user);
    Pointer(ip):=nil;
    ip:=lowercase(Value.ip);
    Pointer(reason):=nil;
@@ -215,7 +215,7 @@
 begin
  Result:=false;
  Expire;
- user:=lowercase(user);
+ user:=AnsiLowerCase(user);
  if user='' then user:='*';
  if ip='' then ip:='*';
  if ip='*.*.*.*' then ip:='*';
@@ -267,7 +267,7 @@
     SplitString(str,lst);
     if lst.Count>4 then
     begin
-      data.user:=lowercase(lst.Strings[0]);
+      data.user:=AnsiLowerCase(lst.Strings[0]);
       data.ip:=lowercase(lst.Strings[1]);
       data.admin:=lst.Strings[2];
       data.time:=StrToIntDef(lst.Strings[3],0);
diff --dos -urN 21192/channels.pas 21193/channels.pas
--- 21192/channels.pas	Sun Sep 29 19:31:16 2002
+++ 21193/channels.pas	Thu Jan 23 17:04:46 2003
@@ -290,7 +290,7 @@
  str,str1,str2: String;
 begin
  item:=bans.first;
- user:=lowercase(user);
+ user:=AnsiLowerCase(user);
  ip:=lowercase(ip);
  while item<>nil do
  begin
@@ -360,13 +360,13 @@
      begin
        SplitString(lst.Strings[8],lst2);
        for j:=0 to lst2.Count-1 do
-        StrHash_AddEx(ch.ops,lowercase(lst2.Strings[j]));
+        StrHash_AddEx(ch.ops,AnsiLowerCase(lst2.Strings[j]));
      end;
      if lst.Count>9 then
      begin
        SplitString(lst.Strings[9],lst2);
        for j:=0 to lst2.Count-1 do
-        StrHash_AddEx(ch.voices,lowercase(lst2.Strings[j]));
+        StrHash_AddEx(ch.voices,AnsiLowerCase(lst2.Strings[j]));
      end;
      db_channels.Add(ch);
    end;
diff --dos -urN 21192/config.pas 21193/config.pas
--- 21192/config.pas	Sun Sep 29 19:31:06 2002
+++ 21193/config.pas	Thu Jan 23 17:04:54 2003
@@ -219,7 +219,7 @@
  if variable='allow_link' then
  begin
    if allow_link=linkCustom then
-    if lowercase(user^.nick)<>lowercase(cons_reg_user) then
+    if AnsiLowerCase(user^.nick)<>AnsiLowerCase(cons_reg_user) then
     begin
       if not (userHideErrors in user^.state) then
        Exec(user,MSG_SERVER_NOSUCH,GetLangT(LNG_ACCESS));
@@ -233,7 +233,7 @@
   if variable='max_cpu_disable' then
   begin
     if not cpu_disable then
-     if lowercase(user^.nick)<>lowercase(cons_reg_user) then
+     if AnsiLowerCase(user^.nick)<>AnsiLowerCase(cons_reg_user) then
      begin
        if not (userHideErrors in user^.state) then
         Exec(user,MSG_SERVER_NOSUCH,GetLangT(LNG_ACCESS));
diff --dos -urN 21192/console.pas 21193/console.pas
--- 21192/console.pas	Sun Oct 06 00:28:52 2002
+++ 21193/console.pas	Thu Jan 23 17:04:58 2003
@@ -403,7 +403,7 @@
  SlavaNapWindow.btn_users_refresh.Enabled:=true;
  SlavaNapWindow.mnu_users_refresh.Enabled:=true;
  if db_online=nil then exit;
- f:=lowercase(SlavaNapWindow.edit_users_filter.Text);
+ f:=AnsiLowerCase(SlavaNapWindow.edit_users_filter.Text);
  if f='' then f:='*';
  with SlavaNapWindow.list_users do
  begin
@@ -421,7 +421,7 @@
     if user^.level>napUserUser then if not SlavaNapWindow.cb_users_mods.Checked then b:=false;
     if user^.server=nil then if not SlavaNapWindow.cb_users_local.checked then b:=false;
     if user^.server<>nil then if not SlavaNapWindow.cb_users_remote.Checked then b:=false;
-    if b then b:=MatchesMaskEx(lowercase(user^.nick),f);
+    if b then b:=MatchesMaskEx(AnsiLowerCase(user^.nick),f);
     if b then
     begin // if matches
       item:=Items.Add;
@@ -430,7 +430,7 @@
       item.SubItems.Add(IntToStr(user^.shared));
       if user^.server=nil then begin//local user
         for k:=0 to db_local.Count-1 do
-          if lowercase(TLocalUser(db_local.Items[k]).nick)=lowercase(user^.nick) then
+          if AnsiLowerCase(TLocalUser(db_local.Items[k]).nick)=AnsiLowerCase(user^.nick) then
           begin
             loc:=db_local.Items[k];
             item.SubItems.Add(IntToStr(loc.shared_size div (1024*1024)));
@@ -495,7 +495,7 @@
  SlavaNapWindow.btn_reg_refresh.Enabled:=true;
  SlavaNapWindow.mnu_reg_refresh.Enabled:=true;
  if db_registered=nil then exit;
- f:=lowercase(SlavaNapWindow.edit_reg_filter.Text);
+ f:=AnsiLowerCase(SlavaNapWindow.edit_reg_filter.Text);
  if f='' then f:='*';
  with SlavaNapWindow.list_registered do
  begin
@@ -509,7 +509,7 @@
      else if reg^.level=napUserUser then b:=SlavaNapWindow.cb_reg_users.Checked
      else b:=SlavaNapWindow.cb_reg_mods.Checked;
      if SlavaNapWindow.cb_reg_muzzled.Checked then b:=userMuzzled in reg^.state;
-     if b then b:=MatchesMaskEx(lowercase(reg^.nick),f);
+     if b then b:=MatchesMaskEx(AnsiLowerCase(reg^.nick),f);
      if b then
      begin
        item:=Items.Add;
diff --dos -urN 21192/handler.pas 21193/handler.pas
--- 21192/handler.pas	Thu Jan 23 01:42:58 2003
+++ 21193/handler.pas	Thu Jan 23 17:05:20 2003
@@ -90,11 +90,11 @@
  i: Integer;
 begin
  Result:=nil;
- nick:=lowercase(nick);
+ nick:=AnsiLowerCase(nick);
  try
-   if (local<>nil) and (lowercase(local.nick)=nick) then Result:=local
+   if (local<>nil) and (AnsiLowerCase(local.nick)=nick) then Result:=local
    else for i:=0 to db_local.Count-1 do
-   if lowercase(TLocalUser(db_local.Items[i]).nick)=nick then
+   if AnsiLowerCase(TLocalUser(db_local.Items[i]).nick)=nick then
    begin
     Result:=db_local.Items[i];
     exit;
@@ -409,7 +409,7 @@
  cmd: TNapCmdEx;
 begin
  tmp_pos:=1253;
- str:=lowercase(user^.nick);
+ str:=AnsiLowerCase(user^.nick);
  i:=db_whowas.FindByCmd(str);
  if i<>-1 then db_whowas.Delete(i);
  tmp_pos:=1254;
@@ -1586,7 +1586,7 @@
                             end;
     MSG_CLIENT_IGNORE_USER: begin
                               if not CheckParams(1) then exit;
-                              if StrHash_FindString(local.ignored,lowercase(gcmd.cmd),false) then
+                              if StrHash_FindString(local.ignored,AnsiLowerCase(gcmd.cmd),false) then
                               begin
                                 local.Exec(MSG_SERVER_ALREADY_IGNORED,gcmd.cmd);
                                 exit;
@@ -1599,12 +1599,12 @@
                                    local.Exec(MSG_SERVER_NOT_IGNORED,gcmd.cmd);
                                    exit;
                                  end;
-                              StrHash_add(local.ignored,lowercase(gcmd.cmd));
+                              StrHash_add(local.ignored,AnsiLowerCase(gcmd.cmd));
                               local.Exec(gcmd.id,gcmd.cmd);
                             end;
     MSG_CLIENT_UNIGNORE_USER: begin
                               if not CheckParams(1) then exit;
-                              if StrHash_Delete(local.ignored,lowercase(gcmd.cmd),false) then
+                              if StrHash_Delete(local.ignored,AnsiLowerCase(gcmd.cmd),false) then
                                 local.Exec(gcmd.id,gcmd.cmd)
                               else
                                 local.Exec(MSG_SERVER_NOT_IGNORED,gcmd.cmd);
@@ -2029,7 +2029,7 @@
  tmp_pos:=270;
  if not isLogged then exit;
  if not CheckParams(1) then exit;
- str:=lowercase(hlist.Strings[0]);
+ str:=AnsiLowerCase(hlist.Strings[0]);
  tmp_pos:=271;
  if str='operserv' then
  begin
@@ -2102,7 +2102,7 @@
      tmp_pos:=122634;
      inc(local.wantqueuep3m);//WQ元がローカルならとりあえずカウント
      tmp_pos:=122635;
-     if (l2<>nil) and StrHash_FindString(l2.hotlist,lowercase(local.nick),true) then
+     if (l2<>nil) and StrHash_FindString(l2.hotlist,AnsiLowerCase(local.nick),true) then
        dec(local.wantqueuep3m);//WQ元とWQ先がともにローカルでホットリストにWQ元がいるときは帳消し
      //-----------------------------------連キューブロック
      tmp_pos:=122636;
@@ -2161,7 +2161,7 @@
    else
     l2:=nil;
    if l2<>nil then
-    if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+    if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
     begin
       UserIsOffline(hlist.Strings[0],true);
       exit;
@@ -3359,7 +3359,7 @@
    tmp_pos:=122634;
    inc(local.dlrequestsp3m);//DL元がローカルならとりあえずカウント
    tmp_pos:=122635;
-   if (l2<>nil) and StrHash_FindString(l2.hotlist,lowercase(local.nick),true) then
+   if (l2<>nil) and StrHash_FindString(l2.hotlist,AnsiLowerCase(local.nick),true) then
      dec(local.dlrequestsp3m);//DL元とDL先がともにローカルでホットリストにDL元がいるときは帳消し
    //--------------------------------------------投網ブロック
    tmp_pos:=122636;
@@ -3461,7 +3461,7 @@
  l2:=FindLocalUser(user2);
  if l2<>nil then
   if user^.level<napUserModerator then
-   if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+   if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
    begin
      Exec(user,MSG_SERVER_UPLOAD_FAILED,gcmd.cmd);
      UserIsOffline(hlist.Strings[0],true);
@@ -3534,7 +3534,7 @@
  l2:=FindLocalUser(user2);
  if l2<>nil then
   if user^.level<napUserModerator then
-   if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+   if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
    begin
      Exec(user,MSG_SERVER_UPLOAD_FAILED,gcmd.cmd);
      UserIsOffline(hlist.Strings[0],true);
@@ -3591,7 +3591,7 @@
  l2:=FindLocalUser(user2);
  if l2<>nil then
   if user^.level<napUserModerator then
-   if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+   if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
    begin
      Error(GetLangT(LNG_OFFLINE2,hlist.Strings[0]),true);
      exit;
@@ -3765,7 +3765,7 @@
  l2:=FindLocalUser(user2);
  if l2=nil then exit; // weird error
   if user^.level<napUserModerator then
-   if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+   if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
    begin
      Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd);
      exit;
@@ -3873,10 +3873,10 @@
    exit;
   end;
   tmp_pos:=451;
-  str:=lowercase(FirstParam(gcmd.cmd));
+  str:=AnsiLowerCase(FirstParam(gcmd.cmd));
   if str='add' then
   begin
-    str:=trim(lowercase(NextParamEx(gcmd.cmd)));
+    str:=trim(AnsiLowerCase(NextParamEx(gcmd.cmd)));
     if str<>'' then
      if not StrHash_FindString(db_Friends,str,false) then
      begin
@@ -3885,7 +3885,7 @@
      end;
   end else if str='remove' then
   begin
-    str:=trim(lowercase(NextParamEx(gcmd.cmd)));
+    str:=trim(AnsiLowerCase(NextParamEx(gcmd.cmd)));
     if StrHash_Delete(db_friends,str,false) then
      Wallop(MSG_SERVER_NOSUCH,wallopFriends,GetLangT(LNG_REMOVEFRIEND,user^.nick,str),true);
   end else if str='list' then
@@ -5302,7 +5302,7 @@
    tmp_pos:=1225;
    if rec=nil then
    begin
-     i:=db_whowas.FindByCmd(lowercase(gcmd.cmd));
+     i:=db_whowas.FindByCmd(AnsiLowerCase(gcmd.cmd));
      str:=gcmd.cmd+' "User" 0';
      tmp_pos:=1226;
      if (i<>-1) and (not cloaked) then
@@ -5342,7 +5342,7 @@
  //-----------------------------------stateの拡張
  user2:=db_online.FindUser(hlist.Strings[0]);
  if user2^.server=nil then l2:=FindLocalUser(user2) else l2:=nil;
- if (l2<>nil) and StrHash_FindString(l2.hotlist,lowercase(local.nick),true) then
+ if (l2<>nil) and StrHash_FindString(l2.hotlist,AnsiLowerCase(local.nick),true) then
    state:=state+' Friend';//whois先がローカルでホットリストにwhois元がいるときは情報追加
  str:=str+AddStr(state)+' ';
  str:=str+IntToStr(user2^.shared)+' '+IntToStr(user2^.downloads)+' '+
@@ -5381,7 +5381,7 @@
 begin
   tmp_pos:=580;
   if time<1 then exit;
-  ban:=lowercase(ban);
+  ban:=AnsiLowerCase(ban);
   tmp_pos:=581;
   if db_bans.FindRec(ban)<>-1 then exit;
   db_bans.Ban('server: '+server,ban,reason,time);
@@ -5399,7 +5399,7 @@
 procedure Ban(ban,reason: String;timeout: time_t; write_all: Boolean);
 begin
   tmp_pos:=583;
-  ban:=lowercase(ban);
+  ban:=AnsiLowerCase(ban);
   if ban='' then exit;
   if ban='*' then exit;
   if ban='*!*' then exit;
@@ -5473,7 +5473,7 @@
  if not isLogged then exit;
  if not CheckLevel('',napUserModerator) then exit;
  if not CheckParams(1) then exit;
- ban:=lowercase(hlist.Strings[0]);
+ ban:=AnsiLowerCase(hlist.Strings[0]);
  tmp_pos:=612;
  i:=db_bans.FindRec(ban);
  while i<>-1 do
@@ -5965,7 +5965,7 @@
  l2:=FindLocalUser(user2);
  if l2<>nil then
   if user^.level<napUserModerator then
-   if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+   if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
    begin
      UserIsOffline(hlist.Strings[0],true);
      exit;
@@ -6226,7 +6226,7 @@
  l2:=FindLocalUser(user2);
  if l2<>nil then
   if user^.level<napUserModerator then
-   if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+   if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
    begin
      Exec(user,MSG_SERVER_BROWSE_DIRECT_ERR,hlist.Strings[0]+' "'+GetLangT(LNG_OFFLINE2,hlist.Strings[0])+'"');
      exit;
@@ -6269,7 +6269,7 @@
  l2:=FindLocalUser(user2);
  if l2<>nil then
   if user^.level<napUserModerator then
-   if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+   if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
    begin
      Exec(user,MSG_SERVER_BROWSE_DIRECT_ERR,hlist.Strings[0]+' "'+GetLangT(LNG_OFFLINE2,hlist.Strings[0])+'"');
      exit;
@@ -6458,13 +6458,13 @@
  if not isLogged then exit;
  if not CheckLevel('',napUserAdmin) then exit;
  if not CheckParams(2) then exit;
- str:=lowercase(hlist.Strings[0]);
+ str:=AnsiLowerCase(hlist.Strings[0]);
  if num_servers>0 then
   for i:=0 to db_servers.count-1 do
   begin
     srv:=db_servers.Items[i];
     if srv.logged then
-     if lowercase(srv.reg_user)=str then
+     if AnsiLowerCase(srv.reg_user)=str then
      begin
        PermissionDenied('',true);
        exit;
@@ -6756,7 +6756,7 @@
  user2:=db_online.FindUser(hlist.Strings[0]);
  if user2=user then user2:=nil;
  tmp_pos:=741;
- str:=lowercase(hlist.Strings[0]);
+ str:=AnsiLowerCase(hlist.Strings[0]);
  if user2<>nil then
  begin
    if user2^.level>=user^.level then
@@ -6770,7 +6770,7 @@
     begin
       srv:=db_servers.Items[i];
       if srv.logged then
-       if lowercase(srv.reg_user)=str then
+       if AnsiLowerCase(srv.reg_user)=str then
        begin
          Error(GetLangT(LNG_ACCESSREG,Level2Str(user2^.level),user2^.nick,srv.host,srv.console),true);
          exit;
@@ -6856,7 +6856,7 @@
    exit;
  end;
  b:=false;
- str:=lowercase(hlist.Strings[0]);
+ str:=AnsiLowerCase(hlist.Strings[0]);
  user2:=db_online.FindUser(hlist.Strings[0]);
  tmp_pos:=752;
  if user2<>nil then
@@ -6874,7 +6874,7 @@
     begin
       srv:=db_servers.Items[i];
       if srv.logged then
-       if lowercase(srv.reg_user)=str then
+       if AnsiLowerCase(srv.reg_user)=str then
        begin
          Error(GetLangT(LNG_ACCESSREG,Level2Str(user2^.level),user2^.nick,srv.host,srv.console),true);
          exit;
@@ -6933,7 +6933,7 @@
     begin
       srv:=db_servers.Items[i];
       if srv.logged then
-       if lowercase(srv.reg_user)=str then
+       if AnsiLowerCase(srv.reg_user)=str then
        begin
          Error(GetLangT(LNG_ACCESSREG,Level2Str(preg^.level),preg^.nick,srv.host,srv.console),true);
          exit;
@@ -6985,7 +6985,7 @@
    begin
      srv:=db_servers.Items[i];
      if srv.logged then
-      if lowercase(srv.reg_user)=lowercase(user2^.nick) then
+      if AnsiLowerCase(srv.reg_user)=AnsiLowerCase(user2^.nick) then
       begin
         PermissionDenied('',true);
         exit;
@@ -7524,7 +7524,7 @@
  if l2<>nil then
  begin
    if user^.level<napUserModerator then
-    if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+    if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
     begin
       UserIsOffline(gcmd.cmd,true);
       exit;
@@ -7552,7 +7552,7 @@
    l2:=FindLocalUser(user2);
    if l2<>nil then
     if user^.level<napUserModerator then
-     if StrHash_FindString(l2.ignored,lowercase(user^.nick),false) then
+     if StrHash_FindString(l2.ignored,AnsiLowerCase(user^.nick),false) then
       user2:=nil;
  end;
  tmp_pos:=831;
@@ -7569,7 +7569,7 @@
    end
    else
    begin
-     i:=db_whowas.FindByCmd(lowercase(gcmd.cmd));
+     i:=db_whowas.FindByCmd(AnsiLowerCase(gcmd.cmd));
      if i<>-1 then
      begin
        p:=db_whowas.Items[i];
@@ -8260,7 +8260,7 @@
    host:=lowercase(host);
    srv:=FindServer(host);
    if local<>cons then
-   if lowercase(local.nick)<>lowercase(cons_reg_user) then
+   if AnsiLowerCase(local.nick)<>AnsiLowerCase(cons_reg_user) then
    if restrict_outgoing then
    if (srv=nil) or (srv.relink=0) then
    begin
@@ -8788,7 +8788,7 @@
  end;
  tmp_pos:=1005;
  // can speak on linked server, but can't speak here
- StrHash_AddEx(ch.ops,lowercase(user^.nick));
+ StrHash_AddEx(ch.ops,AnsiLowerCase(user^.nick));
  srv:=FindServer(StrToIntDef(hlist.Strings[2],0));
  if user^.server=nil then
    Exec(user,MSG_SERVER_PUBLIC,ch.channel+' Server '+GetLangT(LNG_CHANNELOPERATOR,GetServerName(srv),ch.channel));
@@ -8842,7 +8842,7 @@
  srv.console:=hlist.Strings[4];
  srv.hub:=srv2;
  srv.incoming:=hlist.Strings[6]='1';
- srv.reg_user:=lowercase(hlist.Strings[7]);
+ srv.reg_user:=AnsiLowerCase(hlist.Strings[7]);
  srv.logged:=true;
  srv.connected:=conConnected;
  tmp_pos:=1015;
@@ -9589,7 +9589,7 @@
  srv.max_users:=0;
  srv.num_bytes:=0;
  srv.server_handle:=r_handle;
- srv.reg_user:=lowercase(r_reg);
+ srv.reg_user:=AnsiLowerCase(r_reg);
  tmp_pos:=1138;
  srv.Exec(MSG_SRV_LOGIN_ACK,AddStr(SLAVANAP_FULL)+' '+IntToStr(myserverhandle)+' '+cons.nick+' '+AddStr(cons_reg_user));
  srv.Compile;
@@ -9623,7 +9623,7 @@
  server.version:=hlist.Strings[0];
  server.server_handle:=StrToIntDef(hlist.Strings[1],0);
  server.console:=hlist.Strings[2];
- server.reg_user:=lowercase(hlist.Strings[3]);
+ server.reg_user:=AnsiLowerCase(hlist.Strings[3]);
  user2:=db_online.FindUser(server.console);
  tmp_pos:=1142;
  if user2<>nil then
diff --dos -urN 21192/mainform.pas 21193/mainform.pas
--- 21192/mainform.pas	Thu Jan 23 01:18:28 2003
+++ 21193/mainform.pas	Thu Jan 23 17:05:12 2003
@@ -706,7 +706,7 @@
   item:=db_wordset_users.first;
   while item<>nil do
   begin
-    if AnsiPos(LowerCase(nick),LowerCase(item^.data))<>0 then
+    if AnsiPos(AnsiLowerCase(nick),AnsiLowerCase(item^.data))<>0 then
     begin
       style:=NextParam(item^.data);
       break;
@@ -3725,7 +3725,7 @@
  Result:=nil;
  if cons_chat=nil then exit;
  for i:=0 to cons_chat.Count-1 do
-  if lowercase(TSlavaNapChatWindow(cons_chat.Items[i]).user)=lowercase(user) then
+  if AnsiLowerCase(TSlavaNapChatWindow(cons_chat.Items[i]).user)=AnsiLowerCase(user) then
   begin
     Result:=cons_chat.Items[i];
     exit;
@@ -3741,7 +3741,7 @@
  if not running then exit;
  if cons_chat=nil then exit;
  for i:=0 to cons_chat.Count-1 do
-  if lowercase(TSlavaNapChatWindow(cons_chat.Items[i]).user)=lowercase(user) then
+  if AnsiLowerCase(TSlavaNapChatWindow(cons_chat.Items[i]).user)=AnsiLowerCase(user) then
   begin
     Result:=cons_chat.Items[i];
     exit;
@@ -3767,7 +3767,7 @@
  if not running then exit;
  if cons_whois=nil then exit;
  for i:=0 to cons_whois.Count-1 do
-  if lowercase(TSlavaNapWhois(cons_whois.Items[i]).user)=lowercase(user) then
+  if AnsiLowerCase(TSlavaNapWhois(cons_whois.Items[i]).user)=AnsiLowerCase(user) then
   begin
     Result:=cons_whois.Items[i];
     exit;
diff --dos -urN 21192/registered.pas 21193/registered.pas
--- 21192/registered.pas	Sat Oct 05 00:05:16 2002
+++ 21193/registered.pas	Thu Jan 23 17:05:14 2003
@@ -147,9 +147,9 @@
  i: Integer;
 begin
  Result:=-1;
- nick:=lowercase(nick);
+ nick:=AnsiLowerCase(nick);
  for i:=0 to count-1 do
-  if lowercase(PRegisteredUser(Items[i])^.nick)=nick then
+  if AnsiLowerCase(PRegisteredUser(Items[i])^.nick)=nick then
   begin
     Result:=i;
     exit;
@@ -161,9 +161,9 @@
  i: Integer;
 begin
  Result:=nil;
- nick:=lowercase(nick);
+ nick:=AnsiLowerCase(nick);
  for i:=0 to count-1 do
-  if lowercase(PRegisteredUser(Items[i])^.nick)=nick then
+  if AnsiLowerCase(PRegisteredUser(Items[i])^.nick)=nick then
   begin
     Result:=Items[i];
     exit;
@@ -201,9 +201,9 @@
  str: String;
 begin
  Result:=true;
- nick:=lowercase(nick);
+ nick:=AnsiLowerCase(nick);
  for i:=0 to count-1 do
-  if lowercase(PRegisteredUser(Items[i])^.nick)=nick then
+  if AnsiLowerCase(PRegisteredUser(Items[i])^.nick)=nick then
   begin
     str:=PRegisteredUser(Items[i])^.password;
     Result:=(str=null_password) or (str=password);
@@ -305,7 +305,7 @@
  begin
    if lst.Strings[i][1]='#' then
    begin
-     str:=lowercase(lst.Strings[i]);
+     str:=AnsiLowerCase(lst.Strings[i]);
      if str='# version 2' then version:=2;
      if str='# version 3' then version:=3;
    end
diff --dos -urN 21192/stypes.pas 21193/stypes.pas
--- 21192/stypes.pas	Sat Oct 05 01:27:32 2002
+++ 21193/stypes.pas	Thu Jan 23 17:05:06 2003
@@ -24,8 +24,8 @@
  slavastrings, class_cmdlist, class_cmdexlist, class_doublecmdlist;
 
 const
- INDEX_INC = 46;
- MAX_INDEX = 2115;
+ INDEX_INC = 47;//46;
+ MAX_INDEX = 2208;//2115;
 
 {$I defines.pas}
 
@@ -1194,7 +1194,7 @@
    Result:=false;
    exit;
  end;
- str:=lowercase(str);
+ str:=AnsiLowerCase(str);
  // reserved names
  if str='operserv' then Result:=false;
  if str='chanserv' then Result:=false;
@@ -1215,14 +1215,15 @@
    for i:=0 to 4 do if str=lowercase(levels[i]) then Result:=false;
  end;
  if Result=false then exit;
- for i:=1 to Length(str) do
- begin
-   if not (str[i] in ['a'..'z','A'..'Z','0'..'9','_','[',']','{','}','-','@','^','$']) then
-   begin
-     Result:=false;
-     exit;
-   end;
- end;
+// 日本語ID対応のためコメントアウト
+// for i:=1 to Length(str) do
+// begin
+//   if not (str[i] in ['a'..'z','A'..'Z','0'..'9','_','[',']','{','}','-','@','^','$']) then
+//   begin
+//     Result:=false;
+//     exit;
+//   end;
+// end;
 end;
 
 function  check_software(str: String): Boolean;
@@ -1637,7 +1638,7 @@
    '^': Result:=43;
    '!': Result:=44;
    '$': Result:=45;
-   else Result:=-1;
+   else Result:=46;//-1;
  end;
 end;
 
diff --dos -urN 21192/users.pas 21193/users.pas
--- 21192/users.pas	Fri Dec 13 01:43:28 2002
+++ 21193/users.pas	Thu Jan 23 17:05:02 2003
@@ -226,9 +226,9 @@
  i: Integer;
 begin
  Result:=-1;
- nick:=lowercase(nick);
+ nick:=AnsiLowerCase(nick);
  for i:=0 to count-1 do
-  if lowercase(POnlineUser(Items[i])^.nick)=nick then
+  if AnsiLowerCase(POnlineUser(Items[i])^.nick)=nick then
   begin
     Result:=i;
     exit;
@@ -240,9 +240,9 @@
  i: Integer;
 begin
  Result:=nil;
- nick:=lowercase(nick);
+ nick:=AnsiLowerCase(nick);
  for i:=0 to count-1 do
-  if lowercase(POnlineUser(Items[i])^.nick)=nick then
+  if AnsiLowerCase(POnlineUser(Items[i])^.nick)=nick then
   begin
     Result:=Items[i];
     exit;