taskWeeChat - Tasks: task #5594, Add unregister function to the...

 
 

task #5594: Add unregister function to the script plugin API

Submitted by:  Marcus Eggenberger <egs>
Submitted on:  Wed 24 May 2006 05:14:17 PM UTC  
 
Category: other pluginsShould Start On: Wed 24 May 2006 12:00:00 AM UTC
Should be Finished on: Mon 24 Jul 2006 12:00:00 AM UTCPriority: 1 - Later
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Originator Name: Open/Closed: Open
Planned Release: NoneIRC nick: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 23 Dec 2007 04:15:23 PM UTC, comment #2:

...
if weechat.register(NAME, VERSION, "clean", "description"):
raise Exception, "foo"
...

Script is NOT registered after exception arises.
Same statement is valid for die() and perl.
Maybe this way of exception handling is bug, maybe it's feature, I don't know.

// darkk

Anonymous
Wed 24 May 2006 05:15:19 PM UTC, comment #1:

(the python indentation has been screwed but I think it's clear anyway)

Marcus Eggenberger <egs>
Wed 24 May 2006 05:14:17 PM UTC, original submission:

This task encourages the introduction of a new function weechat.unregister to the script plugin API, which unloads the current plugin. At the time beeing there is no counterpart to the function weechat.register.

This function would be especialy helpful if a plugin cannot operate correctly due to the lack of a specific requirement.
If a requirement is not met, it should be reported to the user. Therefore the plugin has to be registered in weechat. At this point the plugin cannot be automaticaly unloaded though it isn't of any use.

Here's an illustration with a pseudo-script in python-notation what it could be like:

weechat.register(NAME, VERSION, ENDFUNCTION, DESCRIPTION)
try:
checkRequirements()
except:
weechat.prnt("Requirement <xy> is not met","")
weechat.prnt("solution: do stuff","")
weechat.unregister("Plugin has not been registered in weechat")

Marcus Eggenberger <egs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup1