This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Some problems in modified LoL TooL'z

Old posts that have not been replied to for several years.
Locked
User avatar
mrdr
Halfop
Posts: 42
Joined: Thu Jun 16, 2005 2:20 pm
Location: Lithuania / Vilnius / Underground
Contact:

Some problems in modified LoL TooL'z

Post by mrdr »

Code: Select all

bind pub o|o [string trim $lol(cmdchar)]draugas pub_lol_addfriend
bind pub o|o +friend pub_lol_addfriend
bind pub o|o [string trim $lol(cmdchar)]nedraugas pub_lol_delfriend
bind pub o|o -friend pub_lol_delfriend

### !draugas <nick> [hand]

proc pub_lol_addfriend {me b c chan arg} {
	set arg [charfilter $arg]
	global lol botnick
	if {![check $c $me $b]} {
		if {$lol(silent) == 1 || [checksilent $c]} {return 0}
            puthelp "NOTICE $me :15,1DËMESIO! Tu 4privalai15,1 identifikuotis prieð naudojantis ðia komanda. Komanda: /msg 4$botnick id15,1 <slaptaþodis>."
		return 0
	}
	if {[llength $arg] < 1} {
		puthelp "NOTICE $me :15,1Sintakse:4 [string trim $lol(cmdchar)]draugas 15,1<nick> [hand]"
		return 0
	}
	set nick [lindex $arg 0]
	set alternate [lindex $arg 1]
	set bot [strlwr $botnick]
	set hostmask "$nick![getchanhost $nick $chan]"
	set hand [nick2hand $nick $chan]
	if {![onchan $nick $chan]} {
            puthelp "NOTICE $me :15,1Atsipraðau, bet ash nematau4 $nick 15,1kanale4 $chan15,1."
		return 0
	}
	if {[strlwr $nick] == $bot} {
            puthelp "NOTICE $me :15,1Atsipraðau, bet að negaliu átraukti 4savæs15,1 á draugø sàraðà."
		return 0
	}
	if {[getting-users]} {
            puthelp "NOTICE $me :15,1Atsipraðau, bet ðiuo metu að esu uþsiëmæs, bandyk vëliau..."
		return 0
	}
	if {[validuser $hand]} {
		puthelp "NOTICE $me :$nick is already recognized with this hand: $hand"
	} {
		if {[validuser $nick] && $alternate == ""} {
			puthelp "NOTICE $me :15,1Toks vartotojas:4 $nick 15,1jau egzistuoja. Naudok:4 !draugas <nickas> [hand]15,1."
			return 0
		}
		if {$alternate != ""} {
			if {[validuser $alternate]} {
                        puthelp "NOTICE $me :15,1Toks handas4 $alternate 15,1jau egzsituoja. Pasirink kità. Naudok:4 !draugas <nickas> [hand]15,1."
				return 0
			}
                        adduser $alternate $nick!*@*.*
		        #adduser $alternate [maskhost $hostmask]
		        #setuser $alternate hosts $nick!*@*.*
                        chattr $alternate +p|+fv $chan
			adduser $alternate [maskhost $hostmask]
			puthelp "NOTICE $me :15,1Sukurtas naujas vartotojas:4 $alternate15,1 ([maskhost $hostmask])."
			puthelp "NOTICE $nick :4$nick 15,1átrauktas á 4$chan 15,1kanalo draugø sàraðà."
			puthelp "NOTICE $nick :15,1Labas, tu kà tik buvai átrauktas(-a) á4 $chan15,1 kanalo draugø sàraðà. :Tu 4PRIVALAI15,1 uþsidëti slaptaþodá, komanda: /msg4 $botnick pass <tavo_slaptaþodis>15,1."
			return 0
		}
		adduser $nick [maskhost $hostmask]
			puthelp "NOTICE $me :15,1Sukurtas naujas vartotojas:4 $alternate15,1 ([maskhost $hostmask])."
			puthelp "NOTICE $nick :4$nick 15,1átrauktas á 4$chan 15,1kanalo draugø sàraðà."
			puthelp "NOTICE $nick :15,1Tu 4PRIVALAI15,1 uþsidëti slaptaþodá, komanda: /msg4 $botnick pass <tavo_slaptaþodis>15,1."
		return 0
	}

	if {$alternate != ""} {
		if {[validuser $alternate]} {
			puthelp "NOTICE $me :The hand $alternate already exist. \002Usage:\002 !adduser <nick> <hand>"
			return 0
		}
		adduser $alternate [maskhost $hostmask]
		puthelp "NOTICE $me :New user: $alternate ([maskhost $hostmask])"
		puthelp "NOTICE $nick :You have been added in $botnick userlist by $me with the hand: $alternate."
		puthelp "NOTICE $nick :You must set a password type: \002/msg $botnick PASS <your_password>\002"
		return 0
	}
	return 0
}

### !nedraugas <nick>

proc pub_lol_delfriend {me b c chan arg} {
	set arg [charfilter $arg]
	global lol botnick
	if {![check $c $me $b]} {
		if {$lol(silent) == 1 || [checksilent $c]} {return 0}
                puthelp "NOTICE $me :You need to be identified to use this function. Type .identhelp in the partyline for more info. : \002/msg $botnick id <password>\002 or \002/msg $botnick silent <password>\002 to no more receive this warning."
		return 0
	}
	if {[llength $arg] != 1} {
		puthelp "NOTICE $me :\002Usage:\002 [string trim $lol(cmdchar)]nedraugas <nick>"
		return 0
	}
	set nick [lindex $arg 0]
	set bot [strlwr $botnick]
	set hand [nick2hand $nick $chan]
	if {![onchan $nick $chan]} {
                puthelp "NOTICE $me :15,1Atsipraðau, bet ash nematau4 $nick 15,1kanale4 $chan15,1."
		return 0
	}
	if {[strlwr $nick] == $bot} {
                puthelp "NOTICE $me :Yeah right, like I'm going to let you delete ME!"
		return 0
	}
	if {[getting-users]} {
                puthelp "NOTICE $me :Sorry, but I'm transferring the userfile, try later."
		return 0
	}
	if {[matchattr $hand n]} {
		puthelp "NOTICE $me :You can't delete a bot owner."
		return 0
	}
	chattr $hand -p|-fv $chan
	-user $hand $chan
	boot $hand "You have been deleted"
      puthelp "NOTICE $me :4$nick 15,1ka tik buvo 4ištrintas15,1 iš kanalo draugu sarašo."
      puthelp "NOTICE $nick :15,1Tu katik buvai 4ištrintas15,1 iš kanalo draugu sarašo."
	if {[botisop $chan]} {pushmode $chan -o $nick}
	return 0
}
The error in bot chat: TCL error [pub_lol_addfriend]: invalid command name "hand"
Last edited by mrdr on Thu Jul 07, 2005 12:44 pm, edited 1 time in total.
IRC: #egghelp @ Aitvaras.NET
IRC: #NASA @ Aitvaras.NET
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

change all entries of [hand] to \[hand\]
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

unescaped brackets in [hand], should be \[hand\]
User avatar
mrdr
Halfop
Posts: 42
Joined: Thu Jun 16, 2005 2:20 pm
Location: Lithuania / Vilnius / Underground
Contact:

Post by mrdr »

Thanks for help.

But why bot don't give +v? That user has +p|+fv :|
IRC: #egghelp @ Aitvaras.NET
IRC: #NASA @ Aitvaras.NET
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

DCC to bot and then type:

Code: Select all

.chanset #chan +autovoice
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked