commit 9548dc5555b38661277e6018f2f13a148aa3c92c Author: sickprodigy Date: Sat May 23 10:08:40 2026 -0400 First successful plugin setup diff --git a/autobuddy/PLUGININFO b/autobuddy/PLUGININFO new file mode 100644 index 0000000..912ea06 --- /dev/null +++ b/autobuddy/PLUGININFO @@ -0,0 +1,4 @@ +Name = "Auto Buddy" +Version = "1.0" +Authors = ["Prodigical"] +Description = "Automatically adds users to your buddy list when they post the trigger phrase in a target room." diff --git a/autobuddy/__init__.py b/autobuddy/__init__.py new file mode 100644 index 0000000..b2f84b2 --- /dev/null +++ b/autobuddy/__init__.py @@ -0,0 +1,28 @@ +from pynicotine.pluginsystem import BasePlugin + +TARGET_ROOM = "SickGaming.net" +TRIGGER_PHRASE = "add me plz" + + +class Plugin(BasePlugin): + name = "Auto Buddy" + description = "Automatically adds users who ask to be added in SickGaming.net" + version = "1.0" + + def server_connect_notification(self): + """Join target room after connecting to Soulseek server.""" + self.log("Connected. Joining room: %s", TARGET_ROOM) + self.core.chatrooms.show_room(TARGET_ROOM, switch_page=False) + + def incoming_public_chat_notification(self, room, user, line): + """Triggered whenever someone talks in a room.""" + if room != TARGET_ROOM: + return + + if user == self.core.users.login_username: + return + + if TRIGGER_PHRASE in line.lower(): + self.log("%s asked to be added. Adding to buddy list.", user) + self.core.buddies.add_buddy(user) + self.send_public(room, f"{user}: added.") diff --git a/autobuddy/__pycache__/__init__.cpython-312.pyc b/autobuddy/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..964783d Binary files /dev/null and b/autobuddy/__pycache__/__init__.cpython-312.pyc differ diff --git a/exampleplugin/PLUGININFO b/exampleplugin/PLUGININFO new file mode 100644 index 0000000..e523ddd --- /dev/null +++ b/exampleplugin/PLUGININFO @@ -0,0 +1,4 @@ +Name = "Example Plugin" +Version = "1.0" +Authors = ["Prodigical"] +Description = "Minimal plugin used to validate plugin loading in this container." diff --git a/exampleplugin/__init__.py b/exampleplugin/__init__.py new file mode 100644 index 0000000..3656b6d --- /dev/null +++ b/exampleplugin/__init__.py @@ -0,0 +1,10 @@ +from pynicotine.pluginsystem import BasePlugin + + +class Plugin(BasePlugin): + name = "Example Plugin" + description = "A minimal Nicotine+ plugin example. Logs when connected." + version = "1.0" + + def loaded_notification(self): + self.log("Example Plugin loaded.") diff --git a/exampleplugin/__pycache__/__init__.cpython-312.pyc b/exampleplugin/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..0b3ae01 Binary files /dev/null and b/exampleplugin/__pycache__/__init__.cpython-312.pyc differ