Sqwak.mac - Guild Motd Changer

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

mponthepc
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Mar 06, 2005 1:01 pm

Sqwak.mac - Guild Motd Changer

Post by mponthepc » Mon Mar 14, 2005 9:10 am

About:
Changes the guild motd by taking text said in a declared chat channel and passing to the guildmotd. Uses an ini to maintain a user list of people who are allowed to call this function. Toon running the macro must have guild officer rights or better.


2005-3-14
+ Release


Code: Select all

| -- Sqwak.mac 
| 
| Program by MPonthePC. 
| Date: 3/14/2005 
| Version: 1.0 
| 
| Overview: Allows people to change the MOTD from chat channel without being an officer. 
| Usage: /macro sqwak ChatChannel
|    Props: Code derived from assitance from blueninja and Goofmester1 as well as much liberty taken from Gimp's Buffbot. 
|    Note: Requires Sqwak.ini
|      * ex: /macro sqawk guildcommand:mypassword 
#chat chat
#define NOT_FOUND   -1
#define SQWAK_INI "SQWAK.INI" 
#define BOOL_TRUE   1 
#define BOOL_FALSE   0 
sub main
/declare ChatChannel string outer None
/echo Sqwak Box Activated
/if (${Defined[Param0]}) {
/varset ChatChannel ${Param0}
/echo Watching channel ${ChatChannel} 
/join ${ChatChannel}
} else {
/Echo No Channel Specified... Quitting.
/end
}
:talkloop 
/doevents 
/goto :talkloop 
/return 
Sub Event_Chat(ChatType,Sender,ChatText)
/declare AllowedSqwak   int local   NOT_FOUND
/varset AllowedSqwak ${Ini[SQWAK_INI, AllowedMOTD, ${Sender}, BOOL_FALSE]} 
      /if (${AllowedSqwak} == BOOL_FALSE) { 
         /echo # Debug: Ignoring MOTD '${ChatText}' from ${Sender}
         /return 
      } ELSE { 
      /if (${ChatType.Equal[${ChatChannel}]}) {
      /guildmotd ${Sender}: ${ChatText}
      } ELSE {
        /echo # Debug: Command in the wrong channel.
      }
      /return
      } 

Code: Select all

| sqwak.ini
[AllowedMOTD] 
ToonName1=1 
ToonName2=1
Last edited by mponthepc on Fri Mar 18, 2005 7:39 am, edited 2 times in total.

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Mon Mar 14, 2005 10:37 am

Nice work.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

CrankyBaby
a lesser mummy
a lesser mummy
Posts: 58
Joined: Thu Mar 11, 2004 5:12 pm
Location: Tijuana.bc.mx
Contact:

Re: Sqwak.mac - Guild Motd Changer

Post by CrankyBaby » Mon Mar 14, 2005 10:05 pm

mponthepc wrote: 2005-5-14
+ Release
Mind if we start using it today, instead of waiting two months? :wink:
Okay, okay, I take it back - "UnF--k you."

“If you play the WinXP CD backwards,
you get a satanic message.”
“That's nothing, if you play it forward,
it installs WinXP.”

bloodurst
a lesser mummy
a lesser mummy
Posts: 56
Joined: Wed Sep 01, 2004 4:53 pm
Contact:

Re: Sqwak.mac - Guild Motd Changer

Post by bloodurst » Mon Mar 14, 2005 11:44 pm

CrankyBaby wrote:
mponthepc wrote: 2005-5-14
+ Release
Mind if we start using it today, instead of waiting two months? :wink:
Lol

mponthepc
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Mar 06, 2005 1:01 pm

Whoops

Post by mponthepc » Fri Mar 18, 2005 7:41 am

Thanks for catching that, I'm always trying to be proactive, but that was too much ;)

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:02 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:03 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:04 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:06 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:07 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:08 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:09 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:10 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:11 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Sqwak.mac - Guild Motd Changer

Post by xyilla » Wed Apr 30, 2025 9:12 pm