--- innwebd/BBS_fun.cpp 2004/06/25 07:01:51 1.1.1.1 +++ innwebd/BBS_fun.cpp 2005/02/26 16:10:25 1.4 @@ -1,10 +1,10 @@ /*******************************************************/ /* */ -/* LeafOK Innd */ -/* Copyright (C) LeafOK.com, 2003-2004 */ +/* LeafOK Innbbsd */ +/* Copyright (C) LeafOK.com, 2003-2005 */ /* */ /* Programmed by Leaf */ -/* E-mail:leaf@leafok.com QQ:6049044 */ +/* E-mail:leaflet@leafok.com QQ:6049044 */ /* */ /* http://bbs.leafok.com */ /* http://bbs.leafok.net */ @@ -85,6 +85,10 @@ CString BBS_fun::LML(const CString& sour { tag_result="]"; } + if (tag_str == "image") + { + tag_result=tag_arg; + } if (tag_str == "bwf") { tag_result="****"; @@ -100,9 +104,8 @@ CString BBS_fun::LML(const CString& sour } } if (p_start-p_current>0) - result_str = result_str + source_str.Mid(p_current,p_start-p_current) + tag_result; - else - result_str += tag_result; + result_str = result_str + source_str.Mid(p_current,p_start-p_current); + result_str += tag_result; p_current=p_end+1; } else @@ -118,19 +121,29 @@ CString BBS_fun::LML(const CString& sour return result_str; } -CString BBS_fun::ip_mask(const CString& ip) +CString BBS_fun::ip_mask(const CString& ip, int level) { int dot_pos; - dot_pos=ip.Find('.'); - if (dot_pos == -1) - return CString(); - - dot_pos=ip.Find('.',dot_pos+1); - if (dot_pos == -1) - return CString(); - - return (ip.Left(dot_pos+1) + "*.*"); + switch(level) + { + case 0: + return ip; + case 1: + dot_pos=ip.Find('.'); + if (dot_pos == -1) + return CString(); + return (ip.Left(dot_pos+1) + "*"); + case 2: + dot_pos=ip.Find('.'); + if (dot_pos == -1) + return CString(); + dot_pos=ip.Find('.',dot_pos+1); + if (dot_pos == -1) + return CString(); + return (ip.Left(dot_pos+1) + "*.*"); + } + return ip; } CString BBS_fun::FB2TXT(CString source_str)