{"id":17786148,"url":"https://github.com/dcodeio/friends","last_synced_at":"2025-04-01T23:23:34.062Z","repository":{"id":65990069,"uuid":"67573499","full_name":"dcodeIO/Friends","owner":"dcodeIO","description":"Universal friends plugin for the Oxide modding framework.","archived":false,"fork":false,"pushed_at":"2016-12-09T11:49:42.000Z","size":52,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T15:15:44.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcodeIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-07T04:58:49.000Z","updated_at":"2018-05-17T15:40:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"f573634f-f028-418d-b75e-8cc768dd1135","html_url":"https://github.com/dcodeIO/Friends","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcodeIO%2FFriends","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcodeIO%2FFriends/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcodeIO%2FFriends/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcodeIO%2FFriends/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcodeIO","download_url":"https://codeload.github.com/dcodeIO/Friends/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246725947,"owners_count":20823698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T09:04:53.047Z","updated_at":"2025-04-01T23:23:34.030Z","avatar_url":"https://github.com/dcodeIO.png","language":"C#","readme":"﻿[license]: https://tldrlegal.com/l/mit\n\nFriends [![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)][License]\n=======\n[Universal friends plugin](http://oxidemod.org/plugins/friends.2120/) for the [Oxide modding framework](https://github.com/OxideMod).\n\nFeatures\n--------\n* Written in C# with efficiency in mind\n* Configurable to your needs\n* Works for every game Oxide supports with Covalence\n* Can be extended with game-specific logic\n* Exposes an easy to use API to other plugins\n* Aims to be API-compatible with [Friends API for Rust](http://oxidemod.org/plugins/friends-api.686/)\n* Compatible with BattleLink / Rust:IO 3.X\n* Includes configurable friendly fire\n* Includes configurable door and turret sharing for Rust\n* Includes configurable friends broadcast and private chat\n\nUsage\n-----\nAs a player, this is how you use the plugin:\n\n| Command                      | Alias  | Description\n|------------------------------|--------|-------------\n| /friends                     |        | Displays your friends list and essential usage instructions\n| /addfriend *name...*         |        | Adds a player to your friends\n| /removefriend *name...*      |        | Removes a player from your friends\n| /fm *message...*             | /f     | Broadcasts a message to all of your friends\n| /pm \"*name...*\" *message...* | /m     | Sends a private message to the specified player\n| /rm *message...*             | /r     | Replies to the last message received\n\nYou can also use the respective unique player id (i.e. Steam ID) instead of a player's name in case that there are multiple\nplayers using the same name.\n\nAlso note that **/fm** and **/pm** may not be available if the server owner decided so, and if available, be aware that these\nmessages can trivially be logged on the server even if there is no logging mechanism by default.\n\nConfiguration\n-------------\nOnce installed, the configuration file becomes available at `oxide/config/Friends.json`. To change your settings, simply edit the file and reload the plugin once afterwards.\n\n| Option                         | Default | Description\n|--------------------------------|---------|-------------\n| MaxFriends                     | 30      | Limits the number of friends a single player can add\n| DisableFriendlyFire            | false   | If `true`, disables friendly fire for friends if supported by the game\n| EnableFriendChat               | false   | If `true`, enables friend chat through the **/fm** command.\n| LimitFriendChatToMutualFriends | true    | If `true`, limits friend chat to mutual friends.\n| EnablePrivateChat              | false   | If `true`, enables private messages through the **/pm** command.\n| SendOnlineNotification         | true    | If `true`, sends a chat notification to each friend when a player connects\n| SendOfflineNotification        | true    | If `true`, sends a chat notification to each friend when a player disconnects\n| SendAddedNotification          | true    | If `true`, sends a chat notification to the newly added friend\n| SendRemovedNotification        | false   | If `true`, sends a chat notification to the removed friend\n\nThere are additional configuration options for specific games:\n\n#### Rust\n\n| Option                  | Default | Description\n|-------------------------|---------|-------------\n| ShareCodeLocks          | false   | If `true`, allows a player's friends to use their doors\n| ShareAutoTurrets        | false   | If `true`, prevents auto turrets from targeting a player's friends\n\nAPI\n---\nThe API is pretty much straight forward:\n\n| Method                                                            | Description\n|-------------------------------------------------------------------|-------------\n| GetMaxFriends():`int`                                             | Gets the maximum number of friends allowed per player.\n| GetPlayerName(**playerId**:`object`):`string`                     | Gets **player**'s current or remembered name, by id.\n| HasFriend(**playerId**:`object`, **friendId**:`object`):`bool`    | Tests if **player** added **friend** to their friends list, by id.\n| AreFriends(**playerId**:`object`, **friendId**:`object`):`bool`   | Tests if **player** and **friend** are mutual friends, by id.\n| AddFriend(**playerId**:`object`, **friendId**:`object`):`bool`    | Adds **friend** to **player**'s friends list, by id.\n| RemoveFriend(**playerId**:`object`, **friendId**:`object`):`bool` | Removes **friend** from **player**'s friends list, by id.\n| GetFriends(**playerId**:`object`):`object`                        | Gets a typed array of **player**'s friends, by id.\n| GetFriendsReverse(**playerId**:`object`):`object`                 | Gets a typed array of players who have added **player** to their friends list, by id.\n\n**Note** that all methods take arbitrary player id types (i.e. `string`, `ulong` or `int`), which makes them independent of\nwhat the game being modded uses to represent player ids.\n\n**GetFriends** and **GetFriendsReverse** in particular return an array of the specified parameter's type (i.e. `ulong[]` if\nthe parameter was `ulong`).\n\nOther methods declared within the source file exist for compatibility purposes only and should not be used in new projects.\n\nAdditionally, the plugin emits its own hooks:\n\n| Hook                                                          | Description\n|---------------------------------------------------------------|-------------\n| OnFriendAdded(**playerId**:`string`, **friendId**:`string`)   | Called when **player** adds **friend** to their friends list, by id.\n| OnFriendRemoved(**playerId**:`string`, **friendId**:`string`) | Called when **player** removes **friend** from their friends list, by id.\n\n#### Example\n\n```cs\n[PluginReference]\nPlugin Friends;\n\n...\n{\n    var hasFriend = Friends?.Call\u003cbool\u003e(\"HasFriend\", playerId, friendId) ?? false;\n    ...\n}\n\nOnFriendAdded(string playerId, string friendId)\n{\n    ...\n}\n```\n\nContributing\n------------\nWe'll be happy to review your pull request or issue...\n\n* if you'd like to add support for your native language.\n* if you'd like to contribute game-specific logic for your favorite game.\n* if you have found a bug or require a specific feature.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcodeio%2Ffriends","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcodeio%2Ffriends","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcodeio%2Ffriends/lists"}