documentation
download & extend
community & support
B3 hosting
May 24, 2012, 12:37:55 AM
Home
Features
Get Started
Supported Games
Forums
Help
Search
Tags
Groupware
Login
Register
Activation Mail
It appears you have not registered with our community. To register please click here ...
You are here:
Big Brother Bot Forum
Community Developers
Plugin Developers
Custom command - adminplugin died
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Custom command - adminplugin died (Read 512 times)
TheBeaST
Newbie
OS: Linux
Type: Renting Server with B3
Gameservers:
CoD6
Posts: 6
Offline
Custom command - adminplugin died
«
on:
October 21, 2011, 07:07:14 AM »
Hiya, I have a problem with writing b3 plugin. I'm not a 'pro' coder but I know some stuff. I've written a plugin with help of Bakes' code from github but after loading it up, every single plugin depending on adminplugin died. The only one left is pingwatcher, and shockingly it works well.
This is my plugin:
http://pastebin.com/J03hpprH
(yes, I know, it fails, still learning)
And here is its xml:
http://pastebin.com/7SEnxwDJ
I can't supply b3.log as it already exceeded max filesize and it got auto-deleted.
Thanks for any help in advance, Arthur.
Logged
82ndAB.Bravo17
Dev. Team
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
COD2,COD4,COD5
Posts: 1098
Offline
Re: Custom command - adminplugin died
«
Reply #1 on:
October 21, 2011, 09:05:33 AM »
B3 log shouldn't get auto deleted, if it gets too big it gets rotated, b3.log.1 etc
We really need it to see what is going on in order to help.
Logged
TheBeaST
Newbie
OS: Linux
Type: Renting Server with B3
Gameservers:
CoD6
Posts: 6
Offline
Re: Custom command - adminplugin died
«
Reply #2 on:
October 21, 2011, 11:44:27 AM »
It seems like my host has installed some software that automatically deletes b3.log.*
All I really ask for is for somebody to point me into right direction to create a plugin that does what mine is supposed to do, which is:
When 100 lvl admin executes !wzmmake (nick of player) (human/zombie), b3 should execute command like in rcon, which is set Make_User_(human/zombie from command) (guid of a player from command).
Logged
Garreth
Beta Testers
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 244
Offline
Re: Custom command - adminplugin died
«
Reply #3 on:
October 21, 2011, 03:04:00 PM »
You're plugin seems pretty complicated, but I see no reason why it should break plugin admin... b3.log (especially part from start until all plugins are started is necessary).
In your code, the function for executin rcon is not really necessary. You could try instead of:
Code:
result = executeRcon("set Make_User_Human ", sclient.guid)
write:
Code:
self.console.write("set Make_User_Human %s" % (sclient.guid))
but your way with exception and separate function is more universal:)
Also, your plugin uses only one command, so why you need to sweep whole xml config file for commands, while you can directly enter:
Code:
self._adminPlugin.registerCommand(self, wzmmake, 100, cmd_wzmmake, alias)
But my plugin experience is based on many failures, so you'd better have distance to my advices in this matter.
Logged
Looking for Polish servers?
TheBeaST
Newbie
OS: Linux
Type: Renting Server with B3
Gameservers:
CoD6
Posts: 6
Offline
Re: Custom command - adminplugin died
«
Reply #4 on:
October 22, 2011, 12:11:03 AM »
I realise it's easier to just add the command without bothering with XML config, but I like having a possibility to easily add a command. I'll try to add the plugin once again, and this time give you a log.
http://pastebin.com/8D0kDXu0
Seems like it can't connect to rcon now which is weird.
Well, that was a weird problem, solved.
Now though, I thought that I'll add this command to MakeRoom plugin (by Courgette).
http://pastebin.com/aFUfhV0r
- def wzmmake is line 200
http://pastebin.com/DcmzxdYL
Here is a piece of b3.log
Lines 206-208:
if not data:
client.message('expecting nick of a player')
return
What could have I possibly done wrong there?
«
Last Edit: October 22, 2011, 06:44:27 AM by TheBeaST
»
Logged
TheBeaST
Newbie
OS: Linux
Type: Renting Server with B3
Gameservers:
CoD6
Posts: 6
Offline
Re: Custom command - adminplugin died
«
Reply #5 on:
October 23, 2011, 04:21:46 AM »
*Bump*
Would nobody answer if I just edit the post?
Logged
82ndAB.Bravo17
Dev. Team
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
COD2,COD4,COD5
Posts: 1098
Offline
Re: Custom command - adminplugin died
«
Reply #6 on:
October 23, 2011, 09:04:43 AM »
Does the rest of the modified makeroom plugin work?
Logged
Garreth
Beta Testers
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 244
Offline
Re: Custom command - adminplugin died
«
Reply #7 on:
October 23, 2011, 09:08:07 AM »
If you edit post it's not shown on recent posts:)
First things first, the first link you provided shows manual shutdown of the BBB, nothing unusual there. You should always try to provide log showing start of the BBB.
Second, have you tried defining function without these "None" values?
Code:
def cmd_wzmmake(self, data, type, client, cmd=None):
Logged
Looking for Polish servers?
TheBeaST
Newbie
OS: Linux
Type: Renting Server with B3
Gameservers:
CoD6
Posts: 6
Offline
Re: Custom command - adminplugin died
«
Reply #8 on:
October 23, 2011, 02:39:20 PM »
Quote from: 82ndAB.Bravo17 on October 23, 2011, 09:04:43 AM
Does the rest of the modified makeroom plugin work?
!makeroom works just as intended.
Quote from: Garreth on October 23, 2011, 09:08:07 AM
If you edit post it's not shown on recent posts:)
First things first, the first link you provided shows manual shutdown of the BBB, nothing unusual there. You should always try to provide log showing start of the BBB.
Second, have you tried defining function without these "None" values?
Code:
def cmd_wzmmake(self, data, type, client, cmd=None):
I don't think it'd make any difference, do you? It's just defining variable a None value before handling it so that when a function is called, these values are optional, can't see anything wrong with that. What's more, every def in makeroom plugin is constructed this way - there is no way this could have any impact on it not working. Anyway, I changed my def to this:
http://pastebin.com/qbY0ZqBG
I'm not sure how b3 passes arguments into defs, but for this to find out if it works I have to wait for my VPS admin to restart B3 (long story short, after using !restart it fu*** up)
Logged
Garreth
Beta Testers
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 244
Offline
Re: Custom command - adminplugin died
«
Reply #9 on:
October 23, 2011, 02:53:00 PM »
Yea, I know, but I used client.message function without any problems...
Also you might want to change:
client.message('text')
into:
cmd.sayLoudOrPM(client, 'text')
Second function distinguish between !command, @command and &command.
Just had an idea, that you might not be importing something... Try:
import b3.plugin
from b3 import clients
Logged
Looking for Polish servers?
TheBeaST
Newbie
OS: Linux
Type: Renting Server with B3
Gameservers:
CoD6
Posts: 6
Offline
Re: Custom command - adminplugin died
«
Reply #10 on:
October 25, 2011, 10:16:23 AM »
Quote from: Garreth on October 23, 2011, 02:53:00 PM
Yea, I know, but I used client.message function without any problems...
Also you might want to change:
client.message('text')
into:
cmd.sayLoudOrPM(client, 'text')
Second function distinguish between !command, @command and &command.
Just had an idea, that you might not be importing something... Try:
import b3.plugin
from b3 import clients
Thank you, import worked
Every single time it's always a stupid mistake ;p Consider the thread closed.
«
Last Edit: October 25, 2011, 02:25:22 PM by TheBeaST
»
Logged
Tags:
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News (Read Only)
===> News Archive
===> Website News
=> General Discussion
===> Servers
=> Shared Services
-----------------------------
Support Forums
-----------------------------
=> Support Instructions
=> Installation Support
=> General Usage Support
=> Game specific Support
===> Battle Field 3
=====> BF3/B3 beta board
===> Battle Field Bad Company 2
===> Call of Duty series
=====> CoD, CoD:UO, CoD2
=====> Call of Duty 4 (Modern Warfare)
=====> Call of Duty 5 (World at War)
=====> Call of Duty 6 (Modern Warfare 2)
=====> Call of Duty 7 (Black Ops)
=======> AlterOps
===> Frontlines, Fuel of War
===> Enemy Territory
===> Homefront
===> Medal of Honor 2010
===> Open Arena
===> Red Orchestra 2
===> Smokin' Guns
===> Soldier of Fortune 2
===> Urban Terror
===> World of Padman
===> Other games
-----------------------------
Add-Ons
-----------------------------
=> Plugins Discussion
===> Plugin Releases!
===> Plugins by xlr8or
===> Plugins by Courgette
===> Plugins by Freelander
===> Plugins by Bakes
===> Plugins by Ismael
===> Plugins by flinkaflenkaflrsk
===> Plugins by Anubis
===> Plugins by Spoon
===> Plugins by PtitBigorneau
===> Plugins by BlackMamba
===> Plugins by Beber888
===> Plugins by grosbedo
=> XLRstats
===> Weaponmodifiers
=> Echelon
===> Echelon version 2
=> Configurations
=> Installers
-----------------------------
Community Developers
-----------------------------
=> Plugin Developers
=> The Code Bin
Rate this page +1 at Google Search
Web Toolbar by Wibiya
SimplePortal 2.3.1 © 2008-2009, SimplePortal