ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_version.c
(Generate patch)

Comparing:
ircd-hybrid-8/modules/m_version.c (file contents), Revision 1230 by michael, Thu Sep 22 19:41:19 2011 UTC vs.
ircd-hybrid/trunk/modules/m_version.c (file contents), Revision 2196 by michael, Tue Jun 4 18:30:12 2013 UTC

# Line 23 | Line 23
23   */
24  
25   #include "stdinc.h"
26 – #include "handlers.h"
26   #include "client.h"
27   #include "ircd.h"
28   #include "numeric.h"
29 < #include "s_conf.h"
29 > #include "conf.h"
30   #include "s_serv.h"
31   #include "s_user.h"
32   #include "send.h"
34 – #include "msg.h"
33   #include "parse.h"
34   #include "modules.h"
35  
36 +
37   /* Option string. */
38   static const char serveropts[] = {
40 –  ' ',
39    'T',
40    'S',
41   #ifdef TS_CURRENT
# Line 50 | Line 48 | static const char serveropts[] = {
48    '\0'
49   };
50  
53 – /* confopts()
54 – *
55 – * input  - client pointer
56 – * output - ircd.conf option string
57 – * side effects - none
58 – */
59 – static char *
60 – confopts(struct Client *source_p)
61 – {
62 –  static char result[12];
63 –  char *p = result;
64 –
65 –  if (ConfigChannel.use_except)
66 –    *p++ = 'e';
67 –  if (ConfigFileEntry.glines)
68 –    *p++ = 'G';
69 –  *p++ = 'g';
70 –
71 –  /* might wanna hide this :P */
72 –  if (ServerInfo.hub &&
73 –      (!ConfigFileEntry.disable_remote || HasUMode(source_p, UMODE_OPER)))
74 –  {
75 –    *p++ = 'H';
76 –  }
77 –
78 –  if (ConfigChannel.use_invex)
79 –    *p++ = 'I';
80 –  if (ConfigChannel.use_knock)
81 –    *p++ = 'K';
82 –  *p++ = 'M';
83 –
84 –  if (ConfigFileEntry.ignore_bogus_ts)
85 –    *p++ = 'T';
86 – #ifdef USE_SYSLOG
87 –  *p++ = 'Y';
88 – #endif
89 – #ifdef HAVE_LIBZ
90 –  *p++ = 'Z';
91 – #endif
92 –  *p++ = '6';
93 –
94 –  *p = '\0';
95 –
96 –  return result;
97 – }
98 –
51   /*
52   * m_version - VERSION command handler
53   *      parv[0] = sender prefix
# Line 117 | Line 69 | m_version(struct Client *client_p, struc
69  
70    last_used = CurrentTime;
71  
72 <  if (!ConfigFileEntry.disable_remote)
72 >  if (!ConfigServerHide.disable_remote_commands)
73      if (hunt_server(client_p, source_p, ":%s VERSION :%s",
74                      1, parc, parv) != HUNTED_ISME)
75        return;
76  
77 <  sendto_one(source_p, form_str(RPL_VERSION),
78 <             me.name, source_p->name, ircd_version, serno,
79 <             me.name, confopts(source_p), serveropts);
77 >  sendto_one(source_p, form_str(RPL_VERSION), me.name,
78 >             source_p->name, ircd_version, serno,
79 >             me.name, serveropts);
80    show_isupport(source_p);
81   }
82  
# Line 143 | Line 95 | mo_version(struct Client *client_p, stru
95      return;
96  
97    sendto_one(source_p, form_str(RPL_VERSION), me.name,
98 <             source_p->name, ircd_version,
99 <             serno, me.name, confopts(source_p), serveropts);
148 <
98 >             source_p->name, ircd_version, serno,
99 >             me.name, serveropts);
100    show_isupport(source_p);
101   }
102  
# Line 159 | Line 110 | ms_version(struct Client *client_p, stru
110             int parc, char *parv[])
111   {
112    if (hunt_server(client_p, source_p, ":%s VERSION :%s",
113 <                  1, parc, parv) == HUNTED_ISME)
114 <  {
115 <    sendto_one(source_p, form_str(RPL_VERSION),
116 <               ID_or_name(&me, client_p),
117 <               ID_or_name(source_p, client_p),
118 <               ircd_version, serno,
119 <               me.name, confopts(source_p), serveropts);
120 <    show_isupport(source_p);
121 <  }
113 >                  1, parc, parv) != HUNTED_ISME)
114 >    return;
115 >
116 >  sendto_one(source_p, form_str(RPL_VERSION),
117 >             ID_or_name(&me, client_p),
118 >             ID_or_name(source_p, client_p),
119 >             ircd_version, serno,
120 >             me.name, serveropts);
121 >  show_isupport(source_p);
122   }
123  
124   static struct Message version_msgtab = {

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)