mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Get rid of irc remnants
Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
parent
d5f55bddce
commit
8a876e4051
3 changed files with 5 additions and 23 deletions
|
@ -30,18 +30,13 @@ c2.EventType = {}
|
||||||
-- Begin src/common/Channel.hpp
|
-- Begin src/common/Channel.hpp
|
||||||
|
|
||||||
---@alias c2.ChannelType integer
|
---@alias c2.ChannelType integer
|
||||||
---@type { None: c2.ChannelType, Direct: c2.ChannelType, Twitch: c2.ChannelType, TwitchWhispers: c2.ChannelType, TwitchWatching: c2.ChannelType, TwitchMentions: c2.ChannelType, TwitchLive: c2.ChannelType, TwitchAutomod: c2.ChannelType, TwitchEnd: c2.ChannelType, Irc: c2.ChannelType, Misc: c2.ChannelType }
|
---@type { None: c2.ChannelType, Direct: c2.ChannelType, Twitch: c2.ChannelType, TwitchWhispers: c2.ChannelType, TwitchWatching: c2.ChannelType, TwitchMentions: c2.ChannelType, TwitchLive: c2.ChannelType, TwitchAutomod: c2.ChannelType, TwitchEnd: c2.ChannelType, Misc: c2.ChannelType }
|
||||||
c2.ChannelType = {}
|
c2.ChannelType = {}
|
||||||
|
|
||||||
-- End src/common/Channel.hpp
|
-- End src/common/Channel.hpp
|
||||||
|
|
||||||
-- Begin src/controllers/plugins/api/ChannelRef.hpp
|
-- Begin src/controllers/plugins/api/ChannelRef.hpp
|
||||||
|
|
||||||
---@alias c2.Platform integer
|
|
||||||
--- This enum describes a platform for the purpose of searching for a channel.
|
|
||||||
--- Currently only Twitch is supported because identifying IRC channels is tricky.
|
|
||||||
---@type { Twitch: c2.Platform }
|
|
||||||
c2.Platform = {}
|
|
||||||
|
|
||||||
---@class c2.Channel
|
---@class c2.Channel
|
||||||
c2.Channel = {}
|
c2.Channel = {}
|
||||||
|
@ -131,9 +126,8 @@ function c2.Channel:__tostring() end
|
||||||
--- - /automod
|
--- - /automod
|
||||||
---
|
---
|
||||||
---@param name string Which channel are you looking for?
|
---@param name string Which channel are you looking for?
|
||||||
---@param platform c2.Platform Where to search for the channel?
|
|
||||||
---@return c2.Channel?
|
---@return c2.Channel?
|
||||||
function c2.Channel.by_name(name, platform) end
|
function c2.Channel.by_name(name) end
|
||||||
|
|
||||||
--- Finds a channel by the Twitch user ID of its owner.
|
--- Finds a channel by the Twitch user ID of its owner.
|
||||||
---
|
---
|
||||||
|
|
|
@ -219,15 +219,6 @@ c2.register_callback(
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `Platform` enum
|
|
||||||
|
|
||||||
This table describes platforms that can be accessed. Chatterino supports IRC
|
|
||||||
however plugins do not yet have explicit access to get IRC channels objects.
|
|
||||||
The values behind the names may change, do not count on them. It has the
|
|
||||||
following keys:
|
|
||||||
|
|
||||||
- `Twitch`
|
|
||||||
|
|
||||||
#### `ChannelType` enum
|
#### `ChannelType` enum
|
||||||
|
|
||||||
This table describes channel types Chatterino supports. The values behind the
|
This table describes channel types Chatterino supports. The values behind the
|
||||||
|
@ -260,9 +251,9 @@ used on non-Twitch channels. Special channels while marked as
|
||||||
is an actual Twitch chatroom use `Channel:get_type()` instead of
|
is an actual Twitch chatroom use `Channel:get_type()` instead of
|
||||||
`Channel:is_twitch_channel()`.
|
`Channel:is_twitch_channel()`.
|
||||||
|
|
||||||
##### `Channel:by_name(name, platform)`
|
##### `Channel:by_name(name)`
|
||||||
|
|
||||||
Finds a channel given by `name` on `platform` (see [`Platform` enum](#Platform-enum)). Returns the channel or `nil` if not open.
|
Finds a channel given by `name`. Returns the channel or `nil` if not open.
|
||||||
|
|
||||||
Some miscellaneous channels are marked as if they are specifically Twitch channels:
|
Some miscellaneous channels are marked as if they are specifically Twitch channels:
|
||||||
|
|
||||||
|
@ -275,7 +266,7 @@ Some miscellaneous channels are marked as if they are specifically Twitch channe
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local pajladas = c2.Channel.by_name("pajlada", c2.Platform.Twitch)
|
local pajladas = c2.Channel.by_name("pajlada")
|
||||||
```
|
```
|
||||||
|
|
||||||
##### `Channel:by_twitch_id(id)`
|
##### `Channel:by_twitch_id(id)`
|
||||||
|
|
|
@ -168,9 +168,6 @@ void PluginController::openLibrariesFor(Plugin *plugin, const QDir &pluginDir)
|
||||||
lua::pushEnumTable<lua::api::EventType>(L);
|
lua::pushEnumTable<lua::api::EventType>(L);
|
||||||
lua_setfield(L, c2libIdx, "EventType");
|
lua_setfield(L, c2libIdx, "EventType");
|
||||||
|
|
||||||
lua::pushEnumTable<lua::api::LPlatform>(L);
|
|
||||||
lua_setfield(L, c2libIdx, "Platform");
|
|
||||||
|
|
||||||
lua::pushEnumTable<Channel::Type>(L);
|
lua::pushEnumTable<Channel::Type>(L);
|
||||||
lua_setfield(L, c2libIdx, "ChannelType");
|
lua_setfield(L, c2libIdx, "ChannelType");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue