thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: Calladmin Plugin  (Read 11705 times)

Offline likeus

  • Jr. Member
  • **
  • Posts: 20
Re: Calladmin Plugin
« Reply #30 on: May 04, 2016, 09:49:27 PM »
hello 
i got thhis error when i test this plugin 
Code: [Select]
160504 20:45:48	CONSOLE	'26:17 say;611BDC58D4578ED62CC07C1FAB6A1499;0;GodoFSeX;!calladmin test'
160504 20:45:48 VERBOSE u'Queueing event Say !calladmin test'
160504 20:45:48 VERBOSE 'Parsing Event: Say: AdminPlugin'
160504 20:45:48 DEBUG u'AdminPlugin: OnSay handle 5:"!calladmin test"'
160504 20:45:48 DEBUG u'AdminPlugin: Handle command !calladmin test'
160504 20:45:48 DEBUG u'CalladminPlugin: sending admin request to all the people in group [9]: [B][ADMIN REQUEST][/B] [B]GodoFSeX[/B] requested an admin on [B]127.0.0.1:27011[/B] : [B]test[/B]'
160504 20:45:50 VERBOSE "RCON sending (127.0.0.1:27011) 'tell 0 ^0(^4R^7V^1O^0)^7: ^3[pm]^7 ^7There was an error processing your command'"
160504 20:45:50 ERROR 'handler AdminPlugin could not handle event Say: AttributeError: \'int\' object has no attribute \'split\' [(\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\parser.py\', 1055, \'handleEvents\', \'hfunc.parseEvent(event)\'), (\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\plugin.py\', 158, \'parseEvent\', \'self.onEvent(event)\'), (\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\plugin.py\', 176, \'onEvent\', \'self.handle(event)\'), (\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\plugins\\\\admin.py\', 296, \'handle\', \'self.OnSay(event)\'), (\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\plugins\\\\admin.py\', 441, \'OnSay\', \'results = command.execute(data, event.client)\'), (\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\plugins\\\\admin.py\', 2227, \'execute\', \'self.func(data, client, copy.copy(self))\'), (\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\extplugins\\\\calladmin.py\', 438, \'cmd_calladmin\', "sent[\'ts3\'] = self.send_teamspeak_message(message)"), (\'C:\\\\Users\\\\Administrator\\\\Documents\\\\game\\\\bigbrother b3\\\\b3mw3\\\\dome\\\\b3\\\\extplugins\\\\calladmin.py\', 372, \'_send_personal_teamspeak_message\', "client_servergroups = [int(x) for x in clientinfo[\'client_servergroups\'].split(\',\')]")]'

Please how can i fix it ?

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2628
Re: Calladmin Plugin
« Reply #31 on: May 05, 2016, 12:06:57 AM »
Please post your config file for the plugin.

Offline likeus

  • Jr. Member
  • **
  • Posts: 20
Re: Calladmin Plugin
« Reply #32 on: May 05, 2016, 10:20:57 AM »
Code: [Select]
# Groups are (keyword / level : description)
# ==============================================
# superadmin / 100 : Super admin (server owner)
# senioradmin / 80 : Senior admins
# fulladmin / 60   : Full admins
# admin / 40       : Admins
# mod / 20         : Moderators
# reg / 2          : Regular players (VIP)
# user / 1         : Registered players (those who typed !register)
# guest / 0        : Unregistered players

[teamspeak]
# teamspeak server ip address.
ip: 164.132.200.170
# teamspeak server query port.
port: 10011
# teamspeak virtual server id.
serverid: 1
# teamspeak server query username [DO NOT LEAVE THIS BLANK].
username: user ts3
# teamspeak server query password [DO NOT LEAVE THIS BLANK].
password: my pass
# set here the Teamspeak 3 group id: people belonging to this group will receive the admin request.
# if you leave -1 as configuration value, the admin request will be broadcasted to everyone (in the global chat area).
msg_groupid: 9

[settings]
# minimum amount of seconds between two consecutive admin requests [DEFAULT = 3600].
treshold: 3600
# whether to send the admin request on the IRC network [IF IRCBOT PLUGIN AVAILABLE].
# NOTE: if this is set to yes, but the IRC BOT plugin is not available, then this functionality will
# be automatically disabled at plugin startup.
useirc = yes

[commands]
calladmin: guest

When i used group id = -1 all going good , but when i change to group 9 , it have this error and cant send message
« Last Edit: May 05, 2016, 10:29:16 AM by likeus »

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 999
    • GitHub
Re: Calladmin Plugin
« Reply #33 on: May 05, 2016, 12:51:20 PM »
I have added a fix for this problem. Please download the latest version from here: https://github.com/danielepantaleone/b3-plugin-calladmin

Offline likeus

  • Jr. Member
  • **
  • Posts: 20
Re: Calladmin Plugin
« Reply #34 on: May 05, 2016, 05:10:02 PM »
thanks it work very good ;)
but why it cant get server name ? i did soething wrong ? 

Code: [Select]
WARNING	"CalladminPlugin: could not retrieve server var (sv_hostname) : 'NoneType' object has no attribute 'getString'"
« Last Edit: May 05, 2016, 05:51:02 PM by likeus »

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 999
    • GitHub
Re: Calladmin Plugin
« Reply #35 on: May 06, 2016, 04:11:01 PM »
Which game are you running?

Offline likeus

  • Jr. Member
  • **
  • Posts: 20
Re: Calladmin Plugin
« Reply #36 on: May 07, 2016, 01:12:36 AM »
this error is in mw3 server

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 999
    • GitHub
Re: Calladmin Plugin
« Reply #37 on: May 07, 2016, 10:13:07 AM »
That's strange. It should work properly since the plugin is looking for the sv_hostname CVAR which is the one where the server name is stored also on MW3. Could you execute this RCON command /rcon sv_hostname and see if it outputs the server name?

Offline likeus

  • Jr. Member
  • **
  • Posts: 20
Re: Calladmin Plugin
« Reply #38 on: May 07, 2016, 11:37:05 AM »
yes in rcon when i use command sv_hostname server outputs the server name , but this plugin cant get name of server , idk how , i also using plugin server status , then it can get name of server without error

Offline likeus

  • Jr. Member
  • **
  • Posts: 20
Re: Calladmin Plugin
« Reply #39 on: May 20, 2016, 07:54:20 AM »
@fenix , have some solution for that ?

Offline obteo

  • Sr. Member
  • ****
  • Posts: 163
    • B2KilL Clan
Re: Calladmin Plugin
« Reply #40 on: May 23, 2016, 02:30:06 PM »
Fenix, we are trying to edit this plugin, we aim to write to a database table instead of TS3, the query i need to send is:
Code: [Select]
                $sql = "INSERT INTO ".$prefix."_shoutbox_shouts (id,name,comment,date,time,ip,timestamp) VALUES ('0','$username','$ShoutComment','$day','$time','$uip','$currentTime')";
                $db->sql_query($sql);

Now, where i have to insert it, and how to get $username $uip and other infos from the submitting user ingame (from the B3 database)? Mind the b3 runs in another machine respect the gameserver.

Thanks for your help.

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 999
    • GitHub
Re: Calladmin Plugin
« Reply #41 on: May 23, 2016, 08:18:05 PM »
You need to create a new database connection with the DBMS you want to execute the query on. Then you need to perform the query from within the cmd_calladmin function: https://github.com/danielepantaleone/b3-plugin-calladmin/blob/master/extplugins/calladmin/__init__.py#L406
About the connection with the DBMS and the query, check the b3.storage package: there is a mysql.py module inside where you should be able to get the code you need. ;)

Offline technoboy

  • Jr. Member
  • **
  • Posts: 13
Re: Calladmin Plugin
« Reply #42 on: May 27, 2016, 01:26:53 AM »
@fenix Nice Plugin, it sends a message to all users in our Info Ts3 Group.
There is just an issue with the ingame response. The user which issues the !calladmin gets the response "There was an Error processing your command". But it still sends the query message to teamspeak.

Code: [Select]
160527 01:12:35 DEBUG    u'CalladminPlugin: sending admin request to all the people in group [421]: [B][ADMIN REQUEST][/B] [B]IEN|stvlker[/B] requested an admin on [B][GER] IEN-Clan HC TDM[/B] : [B]borat[/B]'
160527 01:12:35 VERBOSE  "RCON sending (127.0.0.1:28961) 'tell 1 ^8[pm]^7 ^7There was an error processing your command'"
160527 01:12:35 ERROR    'Handler AdminPlugin could not handle event Say: AttributeError: \'int\' object has no attribute \'split\' [(\'c:\\\\jenkins_slave\\\\workspace\\\\B3-dist-daily\\\\b3\\\\parser.py\', 1412, \'handleEvents\', None), (\'c:\\\\jenkins_slave\\\\workspace\\\\B3-dist-daily\\\\b3\\\\plugin.py\', 479, \'parseEvent\', None), (\'D:\\\\Games\\\\BigBrotherBot\\\\plugins\\\\admin\\\\__init__.py\', 703, \'OnSay\', \'results = command.execute(data, event.client)\'), (\'D:\\\\Games\\\\BigBrotherBot\\\\plugins\\\\admin\\\\__init__.py\', 2422, \'execute\', \'self.func(data, client, copy.copy(self))\'), (\'D:\\\\Games\\\\BigBrotherBot\\\\extplugins\\\\calladmin\\\\__init__.py\', 438, \'cmd_calladmin\', "sent[\'ts3\'] = self.send_teamspeak_message(message)"), (\'D:\\\\Games\\\\BigBrotherBot\\\\extplugins\\\\calladmin\\\\__init__.py\', 372, \'_send_personal_teamspeak_message\', "client_servergroups = [int(x) for x in clientinfo[\'client_servergroups\'].split(\',\')]")]'

It would be nice if you could take a look into it .

Thanks :)

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 999
    • GitHub
Re: Calladmin Plugin
« Reply #43 on: May 27, 2016, 12:21:53 PM »
Please update the plugin to the latest version. This problem has been already solved ;)

 


Rate this page +1 at Google Search