From fb955f0162e07559e2a798242ced1982facac76b Mon Sep 17 00:00:00 2001 From: Thorsten Pfister Date: Fri, 8 Feb 2019 18:54:53 +0100 Subject: [PATCH] Added all public channels. Refactored action listener to use a list for ease of maintenance. --- src/channels.tin | 66 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/src/channels.tin b/src/channels.tin index 11c27e9..db9db45 100644 --- a/src/channels.tin +++ b/src/channels.tin @@ -17,27 +17,55 @@ #ACTION {^You cre-tell:%1} {#LINE {LOG} {$chat_file}}; -#ACTION {^(Playerkillers) %1 wisps{:|} %2} { - #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} - }; -}; -#ACTION {^(Thieves) %1 wisps{:|} %2} { - #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} - }; -}; -#ACTION {^(Wizards) %1 wisps{:|} %2} { - #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} - }; -}; -#ACTION {^(Igame) %1 wisps{:|} %2} { - #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} - }; +#VAR {talker_channels} { + {adventurers}{^(Adventurers)} + {amPalaceGuard}{^(Ankh-MorporkPalaceGuard)} + {apex}{^(Apex)} + {assassins}{^(Assassins)} + {atuin}{^(A'Tuin)} + {conlegiumSicariorum}{^(ConlegiumSicariorum)} + {dead}{^(Dead)} + {djelianGuard}{^(DjelianGuard)} + {duchessSaturdaysMusketeers}{^(DuchessSaturday'sMusketeers)} + {fish}{^(Fish)} + {gapp}{^(Gapp)} + {gufnork}{^(Gufnork)} + {hashishim}{^(Hashishim)} + {hat}{^(Hat)} + {hublandishBarbarians}{^(HublandishBarbarians)} + {hunters}{^(Hunters)} + {igame}{^(Igame)} + {imperialGuard}{^(ImperialGuard)} + {intermud}{^(Intermud)} + {klatchianForeignLegion}{^(KlatchianForeignLegion)} + {lancreHighlandRegiment}{^(LancreHighlandRegiment)} + {manoRossa}{^(ManoRossa)} + {ninjas}{^(Ninjas)} + {one}{^(One)} + {pishe}{^(Pishe)} + {playerkillers}{^(Playerkillers)} + {playtesters}{^(Playtesters)} + {priests}{^(Priests)} + {quiz}{^(Quiz)} + {samurai}{^(Samurai)} + {sandelfon}{^(Sandelfon)} + {sek}{^(Sek)} + {thieves}{^(Thieves)} + {two}{^(Two)} + {warriors}{^(Warriors)} + {weaponMastersCourt}{^(WeaponMasters'Court)} + {witches}{^(Witches)} + {wizards}{^(Wizards)} }; +#FOREACH {$talker_channels[%*]} {talker_channel} { + #ACTION {$talker_channel %1 wisps{:|} %2} { + #if {"$talker_log_toggle" == "1"} { + #LINE {LOG} {$chat_file} + }; + }; +} + #ALIAS {talker log %1} { #if {%1 == "on"} { #var {talker_log_toggle} {1};