Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] The Source Code → /admins modification

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 8

1

Topic: /admins modification

/admins only can check admin online, how i can to cek, /voponline for voice operator online ?

2

Re: /admins modification

You have to add a command, similar to /admins

3

Re: /admins modification

xpeh wrote:

You have to add a command, similar to /admins

but there is no get_auth_vop ??

4

Re: /admins modification

Then you probably have to make it.

5

Re: /admins modification

how about change alias command to pvpgn command ?

like //doubt we changed to /doubt ?

6

Re: /admins modification

gravestar wrote:

/admins only can check admin online, how i can to cek, /voponline for voice operator online ?

/online
This my code:

static int _handle_onlinecrew_command(t_connection * c, char const *text)
{
  unsigned int    i;
  t_elem const *  curr;
  t_connection *  tc;
  char const *    nick;

  std::strcpy(msgtemp,"Currently Online Crew:");
  i = std::strlen(msgtemp);
  LIST_TRAVERSE_CONST(connlist(),curr)
    {
      tc = (t_connection*)elem_get_data(curr);
      if (!tc)
    continue;
      if (!conn_get_account(tc))
        continue;
      if ( (account_get_auth_master(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_developer(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_headadmin(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_admin(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_supervisor(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_headoperator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_operator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_voiceoperator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_cat(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_te(conn_get_account(tc),NULL)==1))
          
    {
      if ((nick = conn_get_username(tc)))
        {
          if (i+std::strlen(nick)+2>sizeof(msgtemp)) /* " ", name, '\0' */
        {
          message_send_text(c,message_type_info,c,msgtemp);
          i = 0;
        }
        
          std::sprintf(&msgtemp[i]," %s", nick);
          i += std::strlen(&msgtemp[i]);
        }
    }
    }
  if (i>0)
    message_send_text(c,message_type_info,c,msgtemp);

  return 0;
}

7

Re: /admins modification

Zeloit wrote:
gravestar wrote:

/admins only can check admin online, how i can to cek, /voponline for voice operator online ?

/online
This my code:

static int _handle_onlinecrew_command(t_connection * c, char const *text)
{
  unsigned int    i;
  t_elem const *  curr;
  t_connection *  tc;
  char const *    nick;

  std::strcpy(msgtemp,"Currently Online Crew:");
  i = std::strlen(msgtemp);
  LIST_TRAVERSE_CONST(connlist(),curr)
    {
      tc = (t_connection*)elem_get_data(curr);
      if (!tc)
    continue;
      if (!conn_get_account(tc))
        continue;
      if ( (account_get_auth_master(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_developer(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_headadmin(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_admin(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_supervisor(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_headoperator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_operator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_voiceoperator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_cat(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_te(conn_get_account(tc),NULL)==1))
          
    {
      if ((nick = conn_get_username(tc)))
        {
          if (i+std::strlen(nick)+2>sizeof(msgtemp)) /* " ", name, '\0' */
        {
          message_send_text(c,message_type_info,c,msgtemp);
          i = 0;
        }
        
          std::sprintf(&msgtemp[i]," %s", nick);
          i += std::strlen(&msgtemp[i]);
        }
    }
    }
  if (i>0)
    message_send_text(c,message_type_info,c,msgtemp);

  return 0;
}

1>..\..\..\src\bnetd\command.cpp(370) : error C3646: 't_command_table_row' : unknown override specifier
1>..\..\..\src\bnetd\command.cpp(370) : error C3646: 'standard_command_table' : unknown override specifier
1>..\..\..\src\bnetd\command.cpp(370) : error C2090: function returns array
1>..\..\..\src\bnetd\command.cpp(370) : error C2272: '_handle_onlinecrew_command' : modifiers not allowed on static member functions
1>..\..\..\src\bnetd\command.cpp(370) : error C2072: 'pvpgn::bnetd::_handle_onlinecrew_command' : initialization of a function
1>..\..\..\src\bnetd\command.cpp(372) : error C2078: too many initializers
1>..\..\..\src\bnetd\command.cpp(373) : fatal error C1903: unable to recover from previous error(s); stopping compilation

8 (edited by Zeloit 07.01.2013 17:12)

Re: /admins modification

Jimmy_Aquarius wrote:
Zeloit wrote:
gravestar wrote:

/admins only can check admin online, how i can to cek, /voponline for voice operator online ?

/online
This my code:

static int _handle_onlinecrew_command(t_connection * c, char const *text)
{
  unsigned int    i;
  t_elem const *  curr;
  t_connection *  tc;
  char const *    nick;

  std::strcpy(msgtemp,"Currently Online Crew:");
  i = std::strlen(msgtemp);
  LIST_TRAVERSE_CONST(connlist(),curr)
    {
      tc = (t_connection*)elem_get_data(curr);
      if (!tc)
    continue;
      if (!conn_get_account(tc))
        continue;
      if ( (account_get_auth_master(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_developer(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_headadmin(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_admin(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_supervisor(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_headoperator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_operator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_voiceoperator(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_cat(conn_get_account(tc),NULL)==1) ||
          (account_get_auth_te(conn_get_account(tc),NULL)==1))
          
    {
      if ((nick = conn_get_username(tc)))
        {
          if (i+std::strlen(nick)+2>sizeof(msgtemp)) /* " ", name, '\0' */
        {
          message_send_text(c,message_type_info,c,msgtemp);
          i = 0;
        }
        
          std::sprintf(&msgtemp[i]," %s", nick);
          i += std::strlen(&msgtemp[i]);
        }
    }
    }
  if (i>0)
    message_send_text(c,message_type_info,c,msgtemp);

  return 0;
}

1>..\..\..\src\bnetd\command.cpp(370) : error C3646: 't_command_table_row' : unknown override specifier
1>..\..\..\src\bnetd\command.cpp(370) : error C3646: 'standard_command_table' : unknown override specifier
1>..\..\..\src\bnetd\command.cpp(370) : error C2090: function returns array
1>..\..\..\src\bnetd\command.cpp(370) : error C2272: '_handle_onlinecrew_command' : modifiers not allowed on static member functions
1>..\..\..\src\bnetd\command.cpp(370) : error C2072: 'pvpgn::bnetd::_handle_onlinecrew_command' : initialization of a function
1>..\..\..\src\bnetd\command.cpp(372) : error C2078: too many initializers
1>..\..\..\src\bnetd\command.cpp(373) : fatal error C1903: unable to recover from previous error(s); stopping compilation

Remember, you create code to account_wrap.cpp and account_wrap.h..
if not code on account, not work this code
example: account_get_master to creating in the account wrap file


Remember too:
static int _handle_onlinecrew_command(t_connection * c, char const * text);

{ "/online"             , _handle_onlinecrew_command },


because in this code is important to working compile

Posts: 8

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 1 guest, 0 registered users

forums.pvpgn.pro → [EN] The Source Code → /admins modification