Disconnect script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Disconnect script

Started by NemeziS, 31 October, 2004, 02:08:34

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NemeziS

Hi!
I need a simple disconnect script.
On command  !disconnect it will just disconnect a user from hub (no kick, no ban, just disconnect like a server is down)

Who can help me with that?
--LUA forever! =)

Madman

This Should work...
--//Simple Disconnecter By Madman
--//Night Work.. Might Be Some Spelling Misstakes

Bot = "Disconneter" --//Change To whatever You want

function Main()
frmHub:RegBot(Bot)
end

function DataArrival(curUser,data)
	if strsub(data, 1, 1) == "<" then
		data=strsub(data,1,strlen(data)-1)
		s,e,cmd = strfind(data,"%b<>%s+(%S+)")
		if curUser.bOperator then --//Must be Op or higher
			if cmd == "!disconnect" then --//The Command
			local s,e,victim = strfind(data, "%b<>%s+%S+%s+(%S+)")
				if victim == nil then
					curUser:SendData(Bot, "Syntax: !disconnect nick")
					return 1
					end
			vUser = GetItemByName(victim)
				if not vUser then
					curUser:SendData(Bot, " *** " ..victim.." is not online or wrong name...")
					return 1
				end
				vUser:Disconnect() --//Disconnect the User
				curUser:SendData(Bot, " *** " ..victim.." was disconnected") --//Notfice You
			end
		end
	end
end
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Corayzon

just to point out,

ptokax has a usercommand called !drop which will silently disconnect users.

;)

noza

Madman

True... But if someone (like me) is running Robocop the !drop command Timebans....
So i was going to do this script anyway... ;p just been to lazy to do it... ;p untill now....
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Corayzon

the drop command bans! wtf, stupid robo allways doing what u dont want it to :P

u should find some new hubscripts!

noza

Madman

Hell no... I like RC... beside.. i bet he has a good reason to make it time ban ;p
besides who cares... i hardly never use it... ;p only to drop my ops ghots... witch dont happen very often...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Corayzon

if rc was built with good reason maybe it would work properly, even as i look over the lastest version all i see is memory leaks and badly writin code. I dont mean to put optimus down but it could be so much better then it currently is.

and what good reason would make !drop timeban? there is no sense behind it! use timeban to ban for a certain time, there is no need to overwrite ptokax's drop command.

neways,,,ill keep my mouth shut

noza

Corayzon

there no need for me to hide my personality. im a simple man of truth and being pure. What i say is what i think and what i think is based on logical assumptions.

sorry to tell ya the truth

noza

Corayzon

ur right dude...u win, but this aint about wining and whos right, its about fast and effective scripts, btw, whats effective mean? and with the bugs in rc, does that the make it effective?

oh and...

another fact...the more u keep ur mouth shut the less u talk, the less u learn! maybe of optimus was a loud mouthed freak like me, he would have learnt something from ppl that know what there on about...and im not talking about me!

noza

Corayzon

i wish i was cool like u Mutor

ur so smart

noza

SMF spam blocked by CleanTalk