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!

You are here: Big Brother Bot ForumAdd-OnsPlugins Discussion (Moderator: MordyT)How to remove messages from Welcome plugin?
Pages: [1]   Go Down
  Print  
Author Topic: How to remove messages from Welcome plugin?  (Read 547 times) Bookmark and Share
Full Member
***
OS: Linux
Type: Owner dedicated server(s)
Gameservers: BF3, RO2, COD-BO
Posts: 127
Offline Offline
« on: December 03, 2011, 12:13:41 PM »

Am I ok to just remove (or comment out) the messages that I don't wish to be displayed from the plugin_welcome.xml file?  For example, if I didnt want the 'first' and 'announce_first' messages displayed, can I do this :-

Code:
<!-- displayed to a user on his first connection -->
<!-- set name="first">^7Welcome $name^7, this must be your first visit, you are player ^3#$id. Type !help for help</set> -->
<!-- displayed to everyone when a player joins for the first time -->
<!-- set name="announce_first">^7Everyone welcome $name^7, player number ^3#$id^7, to the server</set> -->

Thanks.
« Last Edit: December 03, 2011, 12:24:02 PM by Toffees » Logged

Full Member
***
OS: Linux
Type: Owner dedicated server(s)
Gameservers: BF3, RO2, COD-BO
Posts: 127
Offline Offline
« Reply #1 on: December 03, 2011, 03:55:43 PM »

hmmm it seems I'm seeing errors from welcome.py in the logs, most likely because its looking for the items I've commented out.

Code:
111203 21:40:30 ERROR   'STDERR \'Exception in thread Thread-125:\\nTraceback (most recent call last):\\n  File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner\\n    self.run()\\n  File "/usr/lib64/python2.6/threading.py", line 736, in run\\n    self.function(*self.args, **self.kwargs)\\n  File "/home/b3/b3/plugins/welcome.py", line 172, in welcome\\n    client.message(self.getMessage(\\\'first\\\', info))\\n  File "/home/b3/b3/plugin.py", line 78, in getMessage\\n    self._messages[msg] = self.config.getTextTemplate(\\\'messages\\\', msg)\\n  File "/home/b3/b3/config.py", line 112, in getTextTemplate\\n    value = b3.functions.vars2printf(self.get(section, setting, True)).strip()\\n  File "/home/b3/b3/config.py", line 109, in get\\n    raise ConfigParser.NoOptionError(setting, section)\\nNoOptionError: No option \\\'first\\\' in section: \\\'messages\\\'\\n\\n\''

So.... is there any way to stop specific welcomes from being sent?
Logged
Moderator
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 2x CoD4, 1x BF3
Posts: 2627
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #2 on: December 05, 2011, 06:02:45 AM »

Yes. 2 options:

1) You can set the flags at the start of welcome.xml to the number you want. i think we have ours at 32 - custom greetings only.

2) You can leave the message area blank and it will not send it.

I.e change:
set name="first">^7Welcome $name^7, this must be your first visit, you are player ^3#$id. Type !help for help</set>
To
set name="first"></set>
Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Full Member
***
OS: Linux
Type: Owner dedicated server(s)
Gameservers: BF3, RO2, COD-BO
Posts: 127
Offline Offline
« Reply #3 on: December 10, 2011, 11:31:11 AM »

Hi Mordy,

I did what you said but I'm now getting blank lines instead of the message.  I want to prevent b3 form sending anything in regard to certain events like 'announce'.  Isnt there a way to tell b3 not to send anything to the chat window in relation to specific events?

Thanks
Logged
Moderator
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 2x CoD4, 1x BF3
Posts: 2627
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #4 on: December 12, 2011, 05:59:39 AM »

How about changing the flags?

Can you explain exactly what messages you do want to send with welcome plugin?
Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal