/[LeafOK_CVS]/innwebd/BBS_fun.cpp
ViewVC logotype

Diff of /innwebd/BBS_fun.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1.1.1 by sysadm, Fri Jun 25 07:01:51 2004 UTC Revision 1.5 by sysadm, Fri Apr 11 17:14:49 2008 UTC
# Line 1  Line 1 
1  /*******************************************************/  /*******************************************************/
2  /*                                                     */  /*                                                     */
3  /*  LeafOK Innd                                        */  /*  LeafOK Innbbsd                                     */
 /*  Copyright (C) LeafOK.com, 2003-2004                */  
4  /*                                                     */  /*                                                     */
5  /*  Programmed by Leaf                                 */  /*  Copyright (C) LeafOK.com, 2003-2008                */
 /*  E-mail:leaf@leafok.com  QQ:6049044                 */  
6  /*                                                     */  /*                                                     */
7  /*  http://bbs.leafok.com                              */  /*  http://www.leafok.com                              */
 /*  http://bbs.leafok.net                              */  
 /*  http://bbs.fenglin.info                            */  
8  /*                                                     */  /*                                                     */
9  /*******************************************************/  /*******************************************************/
10    
# Line 85  CString BBS_fun::LML(const CString& sour Line 81  CString BBS_fun::LML(const CString& sour
81                                  {                                  {
82                                          tag_result="]";                                          tag_result="]";
83                                  }                                  }
84                                    if (tag_str == "image")
85                                    {
86                                            tag_result=tag_arg;
87                                    }
88                                  if (tag_str == "bwf")                                  if (tag_str == "bwf")
89                                  {                                  {
90                                          tag_result="****";                                          tag_result="****";
# Line 100  CString BBS_fun::LML(const CString& sour Line 100  CString BBS_fun::LML(const CString& sour
100                                  }                                  }
101                          }                          }
102                          if (p_start-p_current>0)                          if (p_start-p_current>0)
103                                  result_str = result_str + source_str.Mid(p_current,p_start-p_current) + tag_result;                                  result_str = result_str + source_str.Mid(p_current,p_start-p_current);
104                          else                          result_str += tag_result;
                                 result_str += tag_result;  
105                          p_current=p_end+1;                          p_current=p_end+1;
106                  }                  }
107                  else                  else
# Line 118  CString BBS_fun::LML(const CString& sour Line 117  CString BBS_fun::LML(const CString& sour
117          return result_str;          return result_str;
118  }  }
119    
120  CString BBS_fun::ip_mask(const CString& ip)  CString BBS_fun::ip_mask(const CString& ip, int level)
121  {  {
122          int dot_pos;          int dot_pos;
123    
124          dot_pos=ip.Find('.');          switch(level)
125          if (dot_pos == -1)          {
126                  return CString();                  case 0:
127                            return ip;
128          dot_pos=ip.Find('.',dot_pos+1);                  case 1:
129          if (dot_pos == -1)                          dot_pos=ip.Find('.');
130                  return CString();                          if (dot_pos == -1)
131                                    return CString();
132          return (ip.Left(dot_pos+1) + "*.*");                          return (ip.Left(dot_pos+1) + "*");
133                    case 2:
134                            dot_pos=ip.Find('.');
135                            if (dot_pos == -1)
136                                    return CString();
137                            dot_pos=ip.Find('.',dot_pos+1);
138                            if (dot_pos == -1)
139                                    return CString();
140                            return (ip.Left(dot_pos+1) + "*.*");
141            }
142            return ip;
143  }  }
144    
145  CString BBS_fun::FB2TXT(CString source_str)  CString BBS_fun::FB2TXT(CString source_str)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1