PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: PlayboyDee on 07 August, 2004, 01:07:19

Title: Simple Script, Simple Commands
Post by: PlayboyDee on 07 August, 2004, 01:07:19
Any request on a script for just basic commands like:

!kick
!ban
(possibly a reg user script)
!massmessage
!banip
etc...

Dont like Robocop, too many commands, plus, I only have 15 users max in the hub and dont need all those commands.  Thankx
Title: Ptokax Standard CMD's
Post by: Psycho_Chihuahua on 07 August, 2004, 01:24:47
if u have a close look at !help in Mainchat

The following commands are available to you:

Profile specific commands:
   !ban () - permanently ban IP address of the , followed by kick. Reason is optional.
   !banip - permanently ban IP address
   !nickban - ban user's nick (if user is connected then he is kicked)
   !unban - unban IP address or Nick
   !getbanlist - display list of banned IP addresses
   !clrtempban - clear tempban list
   !clrpermban - clear permban list
   !drop - silent kick with tempban
   !getinfo - displays basic info on user with given nick
   !op - give a temporal Op status to the for one session
   !gag - the user cant post to mainchat anymore
   !ungag - the user can post to mainchat again
   !restart - restart hub
   !restartscripts - restart scripting part from the hub
   !addreguser - add registered user with specified profile
   !delreguser - remove registered user with
   !ipinfo - Show all on/offline users with that ip
   !iprangeinfo - Show all on/offline users within that iprange
   !userinfo - Show all visits of that user

Global commands:
   !me - speak in 3rd person
   !help - this help page

you will find most of your requests already there ;)
Title:
Post by: jackthebest on 07 August, 2004, 13:02:35
Bot = "[BOT]mssmsg"
function Main()
frmHub:RegBot(Bot)
end

function DataArrival(user,data)
if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if (cmd == "!massmsg") then
if user.bOperator then
s,e,cmd,message = strfind(data,"%s+(%S+)%s+(.*)")
SendPmToAll(Bot,""..user.sName..": "..message)
end
end
end
end

massmsg bot
Title: thanks
Post by: monnie on 09 August, 2004, 19:23:40
Greetings

Jack the best

Thanks for your tip

But that one i have
lol
What i wanted is a simple standalone script
then i can play with the script..
but nevermind
I'll have to learn anyway

Thanks

                         monnie
Title:
Post by: Pacman on 09 August, 2004, 20:15:31
ill write a simple one for you in a sec :D