Hello everyone i made this snippets but im sure it can be scripted shorter OR better.
Its a script made to make a kind of database of fb id its was made for keep a list of Facebook Id/user . To add/del on the ban list ,to add-del specific note everything is saved in txt.files the keep track of the info
And Sorry my english is not very well
Thanks everyone to help me
Command -fbhelp ( For Help With Command )
Updated
on *:TEXT:-fbhelp*:#: {
notice $nick *********************************************************************************************
notice $nick My available commands for, -getid and -Check Script are,
notice $nick -
notice $nick -getid ( FB USERNAME/UID ) eg:http://www.facebook.com/MMC.ADMIN
notice $nick Command is -getid MMC.ADMIN >>>>>>> FaceBook Info >> Full Name: Fred Wall >>> ID: 100000696915994 <<<
notice $nick -
notice $nick -addfbid ( FB,ID ) To create the profile , -delfbid ( FB,ID ) To delete the profile
notice $nick -check ( FB,ID )
notice $nick -
notice $nick -addname ( FB,ID ) Facebook Name , -delname ( FB,ID )
notice $nick -addban ( FB,ID ) reason , -delban ( FB,ID ) ,
notice $nick -addwarn ( FB,ID ) reason , -delwarn ( FB,ID ) ,
notice $nick -addnote ( FB,ID ) Note , -delnote ( FB,ID ).
notice $nick *********************************************************************************************
}
alias fbnumber {
%cislo = $calc($calc($1 / 1) * 2)
if (%cislo != $calc($1 * 2) || %cislo == 0) { msg # $nick $+ : Please enter your Facebook ID . | halt }
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To Create the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-addfbid *:#: {
fbnumber $2
if (!$($+(%,fbid,$2),2)) {
set $+(%,fbid,$2 ) $2
msg $chan Done, you just added 1[04FB ID]: ( $2 ) in DT DataBase.
write addfbid.txt Added by $nick - Facebook ID $2 - $asctime - | load -rs addfbid.txt
}
else {
msg $chan $nick $+ : Sorry this 1[04FB ID]: ( $2 ) is already in DT DateBase. Type [-check ( $2 ) ] or [-fbhelp]
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To Delete the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-delfbid &:#: {
if ($nick isop $chan) {
fbnumber $2
if ($($+(%,fbid,$2),2)) {
msg $chan 1[04ID]: $2 has been removed from DT DateBase. by $nick
write delfbid.txt Facebook ID $2 - Deleted by $nick - $asctime(hh:nntt) - | load -rs delfbid.txt
unset $+(%,fbid,$2)
unset $+(%,name,$2)
unset $+(%,ban,$2)
unset $+(%,warn,$2)
unset $+(%,note,$2)
}
else {
msg $chan $nick Nothing was found for ID $2 in DT DateBase.
}
}
else {
msg $chan $nick $+ : Permission Denied *** You need to be op or higher to perform this command.
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To Create the name for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-addname *:#: {
fbnumber $2
if (!$($+(%,name,$2),2)) {
set $+(%,name,$2) $3-
msg $chan Name $3- has been added to Facebook ID, $2.
write addname.txt Added by $nick - Name $3 - Facebook ID $2 - $asctime - | load -rs addname.txt
}
else {
msg $chan $nick $+ : Sorry this 1[04Name]: ( $3- ) for 1[04FB ID]: ( $2 ) is already in DT DateBase.
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To Delete the name for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-delname &:#: {
fbnumber $2
if ($($+(%,name,$2),2)) {
msg $chan 1[04Name]: $3- has been removed from DT DateBase. by $nick
write delname.txt - Name $3 - Facebook ID $2 - Deleted by $nick - $asctime(hh:nntt) - | load -rs delname.txt
unset $+(%,name,$2)
}
else {
msg $chan $nick Nothing was found for Name $3- in DT DateBase.
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To add a ban for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-addban *:#: {
fbnumber $2
if (!$($+(%,ban,$2),2)) {
set $+(%,ban,$2) 1[04Reason]: $3 1[04Added by]: $nick 1[04On]: $date 1[04At]: $asctime(hh:nntt)
msg $chan 1[04Ban Reason]: $3- ,has been added to Dt Database . by $nick for 1[04ID]: $2
write addban.txt Added by $nick - Ban Reson $3- - Facebook ID $2 - $asctime - $date | load -rs addban.txt
}
else {
msg $chan $nick Sorry this 1[04FB ID]: ( $2 ) is already in DT DateBase for 1[04Ban Reason]: ( $3 ).
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To delete a ban for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-delban &:#: {
fbnumber $2
if ($($+(%,ban,$2),2)) {
msg $chan 1[04Ban]: has been removed from DT DateBase for 1[04FB ID]: ( $2 ) . by $nick
write delban.txt Ban $3- for Facebook ID $2 - Deleted by $nick - $asctime(hh:nntt) - | load -rs delban.txt
unset $+(%,ban,$2)
}
else {
msg $chan $nick Nothing was found for Bans in DT DateBase.
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To add a warning for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-addwarn *:#: {
write addwarn.txt Added by $nick - Warn $3 - Facebook ID $2 - $asctime -
fbnumber $2
if (!$($+(%,warn,$2),2)) {
set $+(%,warn,$2) $3- by $nick
msg $chan 1[04Warn Reason]: $3- ,has been added to Dt Database . by $nick for 1[04ID]: $2 Date : $asctime | load -rs addwarn.txt
}
else {
msg $chan $nick Sorry this 1[04FB ID]: ( $2 ) is already in DT DateBase for 1[04Warn Reason]: ( $3- ).
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To delete a warning for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-delwarn &:#: {
fbnumber $2
if ($($+(%,warn,$2),2)) {
msg $chan 1[04Warn]: has been removed from DT DateBase for 1[04FB ID]: ( $2 ) . by $nick
write delwarn.txt Warn $3- for Facebook ID $2 - Deleted by $nick - $asctime - | load -rs delwarn.txt
unset $+(%,warn,$2)
}
else {
msg $chan $nick Nothing was found on Warn list for ID $2 .
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To add a note for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-addnote *:#: {
fbnumber $2
if (!$($+(%,note,$2),2)) {
set $+(%,note,$2) ( $3- ) $asctime
msg $chan 1[04Note]: $3- ,has been added to Dt Database . by $nick for 1[04FB ID]: ( $2 ) Date : $asctime
write addnote.txt Added by $nick - Notes $3 - Facebook ID $2 - $asctime - | load -rs addnote.txt
}
else {
msg $chan $nick Sorry this 1[04FB ID]: ( $2 ) is already in DT DateBase for 1[04Note]: ( $3- ).
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To delete a note for the Facebook id;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ON *:TEXT:-delnote &:#: {
/isnumber $2
if ($($+(%,note,$2),2)) {
msg $chan 1[04Note]: has been removed from DT DateBase for 1[04FB ID]: ( $2 ) . by $nick
write delnote.txt Warn for Facebook ID $2 - Deleted by $nick - $asctime - | load -rs delnote.txt
unset $+(%,note,$2)
}
else {
msg $chan $nick Nothing was found on Note list for ID $2 .
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;To check any id u already added to Facebook id datebase on typing -addfbid(id);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:TEXT:-check*:#: {
if ($($+(%,fbid,$2),2 )) {
fbnumber $2
msg $chan >> 1[04FaceBook Link]: https://www.facebook.com/profile.php?id= $+ $2
if ($($+(%,name,$2),2)) {
msg $chan >> 1[04FaceBook Name]: $ifmatch
}
else {
msg $chan >> 1[04FaceBook Name]:
}
if ($($+(%,ban,$2),2)) {
msg $chan >> 1[04Ban List]: Yes >>> 1[04ID]: $+($2) $ifmatch
}
else {
msg $chan >> 1[04Ban List]:
}
if ($($+(%,warn,$2),2)) {
msg $chan >> 1[04Warning List]: $ifmatch
}
else {
msg $chan >> 1[04Warning List]:
}
if ($($+(%,note,$2),2)) {
msg $chan >> 1[04Notes]: $ifmatch
}
else {
msg $chan >> 1[04Notes]:
}
}
else {
msg $chan $nick , Nothing was found in 1[04FaceBook] DataBase FOR >> 1[04ID]: ( $2 )
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End of Check Facebook id script;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Since the code makes a control variable( if (!$($+(%,note,$2),2)) ), takes advantage of the variable. :)
example:
ON *:TEXT:-addname *:#: {
fbnumber $2
;// if don t exist...continue (message chan + write in the file.txt)
if (!$($+(%,name,$2),2)) {
set $+(%,name,$2) $3-
msg $chan Name $3- has been added to Facebook ID, $2. | load -rs addname.txt
write addname.txt Added by $nick - Name $3 - Facebook ID $2 - $asctime -
}
;// esle ...sorry is already in DT DateBase etc etc ...and not write in the file.txt
else {
msg $chan $nick $+ : Sorry this 1[04Name]: ( $3- ) for 1[04FB ID]: ( $2 ) is already in DT DateBase.
}
}
2 i dont understand what u mean ?
ON *:TEXT:-addnote *:#: {
;// when you type the command ''-addnote word word etc etc'', is adding a line in the file even if the same row already exists.
;// example: frederik type: -addnote MoMy not understand anything about English
;// in the file addnote.txt will add the line '' Added by frederik - Notes MoMy not understand anything about English'' date -
;// If you throw the same command with the same sentence, get the message ''Sorry this [FB ID]: ( -addnote ) is already in DT DateBase for [Note]'' etc etc
;// because there is a variable %note-addnote(etc-etc) but the file will add a new row duplicates.
write addnote.txt Added by $nick - Notes $3 - Facebook ID $2 - $asctime -
fbnumber $2
if (!$($+(%,note,$2),2)) {
set $+(%,note,$2) ( $3- ) $asctime
msg $chan 1[04Note]: $3- ,has been added to Dt Database . by $nick for 1[04FB ID]: ( $2 ) Date : $asctime | load -rs addnote.txt
}
else {
msg $chan $nick Sorry this 1[04FB ID]: ( $2 ) is already in DT DateBase for 1[04Note]: ( $3- ).
}
}
and this thing happens on all the events on text that you wrote
i dont know how to use $read thats why i do it my .txt
6.if i know how to make that write to file own instead to delete an entry in the file addname.txt or add-equivalent, so that remove an item? i will do it but i dont know how :(
There are some things I do not understand:
line 19, Why divide a number by 1, is not a transaction in more?
$calc($calc($1 / 1) * 2)
Why in many events on text for it is the control variable (if exist) but does not check whether this file contains the line?
Thus writes the same text several times
Why are asked to load a txt file?
It is easier to use $read to check or read the content
What is the command /ISNUMBER $2??
What is the command fbnumber?
For example, in facebook I do not have a numeric id but alphanumeric id, so I always get an error.
ok je me disais bien ^^
en gros je te conseil de rassembler tout tes event on *text:#:{ en un seul event comme je te l'ai montré
quand tu codes mets pas de salons spécifiques dans les remotes, tu peux pas obligé les gens à aller sur les salons que tu décides toi
au niveau de l'alias tu as fais n'importe quoi lol en gros je te disais de le mettre dans le code mais juste en le rajoutant en dessous de ton code la ton code ne doit surement pas fonctionner
si tu veux discuter viens sur irc.geekshed.net salon #Script-Help
I see this alias repeated several times:
alias isnumber {
%cislo = $calc($calc($1 / 1) * 2)
if (%cislo != $calc($1 * 2) || %cislo == 0) { msg # $nick $+ : Please put Facebook ID . | halt }
}
I did not understand what is.
And then, if $calc($1 / 1) = $1 (123456789 / 1 = 123456789), why divide by 1?.
if the variables need not be invoked in other events or alias, why not use local variables that dirty minus mirc register?.
set %variable = value and %variable = value, leave traces in the registry and this helps when you need to call a variable with alias or other events.
excuse my bad english
Edit: I do not know why out of the tag
to each line in the code. :\
Then why put names of salons in the last two events?
Code
(Select All)
ON *:TEXT:-check &:#sexychat: {
on :TEXT:-check:#teamsevent: {
Thanks to help they have 2 name of salons because in #sexychat it doest post all the info when u do -check like in main chan
What is post in #sexychat
http://i50.tinypic.com/9uqgrr.png
What is post in #teamsevent
http://i47.tinypic.com/35a1zbb.png
Hello
First put all in one event
on *:text:*:#:{
if $nick isop $chan {
if $1 == -chelp { msg # chelp }
elseif $1 == -addname && $2 { msg # addname }
}
else {
if $1 == -addfbid { msg # addfbid }
}
}
Then why put names of salons in the last two events?
ON *:TEXT:-check &:#sexychat: {
on *:TEXT:-check*:#teamsevent: {
and you put your alias to an alias instead of asking people to put in the alias section
alias isnumber {
%cislo = $calc($calc($1 / 1) * 2)
if (%cislo != $calc($1 * 2) || %cislo == 0) { msg # $nick $+ : Please put Facebook ID . | halt }
}